On Wednesday 10 March 2004 19:53, [EMAIL PROTECTED] wrote:
> I have a problem separting a text string with the preg_split function
> If somebody could help, it would be greatly appreciated.
> -
> The problem I have is that my code, so far, does the job, except it
> recognises ALL ":" and no
At 17:58 09.11.2002, samug said:
[snip]
>$text = "And what did I tell you?";
>list($one,$two,$three,$rest) = preg_split("/\s+/", $text);
>print($rest);
>
>The result would be "I" and not "I tell you?"
[snip]
Your rege
On Sunday 10 November 2002 00:58, samug wrote:
> 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);
>
> The result would be "I" and not "I tell you?"
> Why?
Because that is what you aske
list throws away the other two array elements, you need
list($one,$two,$three,$rest) = preg_split("/\s+/", $text, 4);
samug wrote:
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);
The re
4 matches
Mail list logo