Re: explode string variable
| From: | Leif K-Brooks | Date: | Sat, 08 Mar 2003 21:21:37 +0000 |
| Subject: | Re: explode string variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138782@lists.php.net to get a copy of this message | ||
Try the limit parameter of the explode function, www.php.net/explode.
André Sannerholt wrote:
Hi everyone! Does anybody know how to "stop" an "explosion" of a string: Let me explain: $variable_aray=explode('-', $variable); I want the variable to be devided in only two other ones! If for example: $variable="Willy-Brandt-Platz-5" I want to have an array that looks like this: $variable_array[0] should be "Willy" $variable_array[1] should be "Brandt-Platz" Regards André-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.