note 57708 rejected from function.str-replace by cece
| From: | cece@php.net | Date: | Wed, 12 Oct 2005 06:00:23 +0000 |
| Subject: | note 57708 rejected from function.str-replace by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-96880@lists.php.net to get a copy of this message | ||
Note Submitter: Jake - eqrulez at msn dot com
----
How would you make it so that it does a random number.
$text[post_text]=str_replace("\n", "<br>", $text[post_text]);
$text[post_text]=str_replace("[b]", "<b>", $text[post_text]);
$text[post_text]=str_replace("[/b] ", "</b>", $text[post_text]);
$text[post_text]=str_replace("[i]", "<i>", $text[post_text]);
$text[post_text]=str_replace("[/i]", "</i>", $text[post_text]);
$text[post_text]=str_replace("[u]", "<u>", $text[post_text]);
$text[post_text]=str_replace("[/u]", "</u>", $text[post_text]);
$text[post_text]=str_replace("<", "<", $text[post_text]);
$text[post_text]=str_replace(">", ">", $text[post_text]);
I need it so that [b:(10 RANDOM NUMBERS HERE)] is replaced with <b>