You are here

function _zopim_string_to_array in Zopim Live Chat 8

Converts a text with lines (\n) into an array of lines.

Parameters

string $text: Text with lines to convert.

Return value

array Array with as many items as non-empty lines in the text.

File

./zopim.module, line 119

Code

function _zopim_string_to_array($text) {
  $text = str_replace("\r\n", "\n", $text);
  return array_filter(explode("\n", $text), 'trim');
}