preg_match quastion

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All, wondering if someone could help me with this.
I have a variable $var="blh blh blah bldd erter etert";
i need to get first three words from it so basically i have to
,somehow, count first three spaces and get "blh blh blah" to a new var.
Any idea?
Thank you all!

Re: preg_match quastion

Quoted text here. Click to load it

$first_three=join(" ", array_slice(explode(" ", $var), 0, 3));

if you want to do it without preg_match :)  

Site Timeline