Why not:

$array = split("[ ,]", $line);

?

On Wed, 22 Jan 2003, Kris wrote:

> Hi
>
> I'm having dramers with fscanf
> I have a line:
> text, text, text
>
> I can't work out how to scan removing the comma and whitespace.
> the text can be absolutle anything.
>
> at the moment I have
> $array = fscanf ($fp, %s%[^,] %s%[^,] %s%[^,]);
>
> Thanks
>
> Kris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to