" " charactor problem
| From: | Rick Ridgeway | Date: | Sun, 21 Jan 2001 04:57:30 +0000 |
| Subject: | " " charactor problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35879@lists.php.net to get a copy of this message | ||
im trying to build an array from an entry in a file and im having some
trouble with it.
in a file i have a line similar to:
1234 hello 123456 12345678
I grab this line and try to make it an array like this:
$var1 = trim($thelinefromfile);
$var2 = split(" ", $thelinefromfile);
$count = count($var2);
$count comes out to equal 1
so, it doesnt actually see each space as the seperator therefore it sees it
as one field..
Ive also tried split("\ ", $thelinefromfile);
but, that doesnt work either...
ive tried ereg_replace($space, $commathenspace, $thelinefromfile);
that also does not seem to work....
Please help...
Thanks in advance
Rick