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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to