note 99687 added to function.str-replace

From: Date: Tue, 31 Aug 2010 02:27:11 +0000
Subject: note 99687 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-172183@lists.php.net to get a copy of this message
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']); ---- Server IP: 69.147.83.197 Probable Submitter: 113.106.106.131 ---- Manual Page -- http://www.php.net/manual/en/function.str-replace.php Edit -- https://master.php.net/note/edit/99687 Del: integrated -- https://master.php.net/note/delete/99687/integrated Del: useless -- https://master.php.net/note/delete/99687/useless Del: bad code -- https://master.php.net/note/delete/99687/bad+code Del: spam -- https://master.php.net/note/delete/99687/spam Del: non-english -- https://master.php.net/note/delete/99687/non-english Del: in docs -- https://master.php.net/note/delete/99687/in+docs Del: other reasons-- https://master.php.net/note/delete/99687 Reject -- https://master.php.net/note/reject/99687 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#172183) next »