If they are all in a format like that, first just read the text file with
fopen/fread into one big string.

Then use:

$refined_string = explode(" ", $bigstring);

That's the main way to do it, but the preferable way is using a regular
expression with either the ereg or preg functions.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Jan Grafström" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi!
> I want to read a textfile (cat, dog, rat,) and get it like this:
> $namesArray = array("cat,", "dog,", "rat,");
> If I can do this than I can go on and make changes in my array.
> Like the examples in php manual.
>
>
> Thanks in advance for any tips.
>
> Regards
> Jan
>
>
>
> --
> 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]
>



-- 
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