note 57708 added to function.str-replace
| From: | Jake-eqrulez at msn dot com | Date: | Wed, 12 Oct 2005 00:02:44 +0000 |
| Subject: | note 57708 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96873@lists.php.net to get a copy of this message | ||
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>
----
Manual Page -- http://www.php.net/manual/en/function.str-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57708
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57708&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57708&report=yes
Search -- http://master.php.net/manage/user-notes.php