note 99687 rejected from function.str-replace by cataphract

From: 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']);

« previous php.notes (#172188) next »