Search the blog

The following code splits a string into an array of lines of text.

$lines = preg_split("/\r\n|\n|\r/", $text);
Tim Bennett is a Leeds-based web designer from Yorkshire. He has a First Class Honours degree in Computing from Leeds Metropolitan University and currently runs his own one-man web design company, Texelate.