This is a part of my code :
$intext = "this is a \n\n\n\r\r test sentence";
$word = preg_split("/[(\s)*(\n)*(\r)*(\t)*(\f)*]+/i",$intext);
print_r($word);
When I run it in the browser, I get:
Array ( [0] => this [1] => is [2] => a [3] => test [4] => sentence )
But when I run it in the command prompt, I get
Array
(
[0] => this
[1] => is
[2] => a
[3] =>
)
Why the difference? I want it to be as in the browser.
I am using PHP 5.2.8 on Windows XP.