note 99687 rejected from function.str-replace by cataphract
| From: | cataphract@php.net | Date: | Tue, 31 Aug 2010 05:08:09 +0000 |
| Subject: | note 99687 rejected from function.str-replace by cataphract | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172188@lists.php.net to get a copy of this message | ||
Note Submitter: shenggxhz at gmail dot com
----
when i use these code ,it has a problem.The result isn't i expect, Because #3 well be replaced
by the third element of replace. Who can solve this?
$row['priority'] = str_replace(array('1', '2', '3',
'4', '5'), array("<font
color='#390'>ä½<</font>", '<font
color="#990">ä¸</font>', '<font
color="#960">é«</font>','<font
color="#c30">ç´§æ¥</font>', '<font
color="#f0f">严é</font>'), $row['priority']);