note 9550 added to explode

From: Date: Fri, 10 Nov 2000 13:21:25 +0000
Subject: note 9550 added to explode
Groups: php.notes 
Request: Send a blank email to php-notes+get-7573@lists.php.net to get a copy of this message
I have not been able to use the third, optional parameter successfully. This results in an incorrect number of parameters error. An 'explode' that works correctly breaks as soon as I add a limit, something that would be very useful to me... $mystring = "Joe Bloggs Flat 1, 2 Mornington Place, London"; $info = explode(" ", $mystring, 3); Wouldn't it be nice if this gave an array populated like this... $info[0] "Joe" $info[1] "Bloggs" $info[2] "Flat 1, 2 Mornington Place, London" But I get the error described above :( http://www.php.net/manual/function.explode.php

« previous php.notes (#7573) next »