At 18:59 09.11.2002, samug said:
--------------------[snip]--------------------
>Thanks.
>But what if you don't know how many elements there will be ahead?
>
>"Samug" <[EMAIL PROTECTED]> kirjoitti viestissä
>news:20021109165530.58233.qmail@;pb1.pair.com...
>> Could someone tell me why isn't this working?
>>
>> $text = "And what did I tell you?";
>> list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
>> print($rest);
--------------------[snip]-------------------- 

You don't need the number of elements _ahead_, just the number of elements
you want to receive - the "rest" will be in the last element.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



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

Reply via email to