note 5586 deleted from split by torben
| From: | torben@php.net | Date: | Sun, 10 Sep 2000 21:45:08 +0000 |
| Subject: | note 5586 deleted from split by torben | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4671@lists.php.net to get a copy of this message | ||
How would you replicate the following Perl code in PHP?
@letters = split('',$var);
---
The answer is simple: you don't have to. PHP allows $string[<character>] access already.
how could i find a new line in a multilined text area and replace it with <br> ?
---
You're using the wrong function. What you want can be accomplished with:
<PRE>str_replace("n", "<BR>", $your_string)</PRE>
---
-Richard