kamkam
03-14-2009, 12:29 AM
Hi;
I am trying to replace the empty space with the ',' from a string which group by unicode.
I want to have result as following;
锕=錒','锿=鎄','皑=皚','嗳=噯','蔼=藹','霭=靄','爱=愛','嫒=嬡
but my code does not do anything,just give me like the following,could anyone help me, please, thanks.
锕=錒 锿=鎄 皑=皚 嗳=噯 蔼=藹 霭=靄 爱=愛 嫒=嬡
<?php
mb_internal_encoding("UTF-8");
$search=" ";
$replace="','";
$string="锕=錒 锿=鎄 皑=皚 嗳=噯 蔼=藹 霭=靄 爱=愛 嫒=嬡";
echo str_ireplace($search,$replace,$string);
?>
I am trying to replace the empty space with the ',' from a string which group by unicode.
I want to have result as following;
锕=錒','锿=鎄','皑=皚','嗳=噯','蔼=藹','霭=靄','爱=愛','嫒=嬡
but my code does not do anything,just give me like the following,could anyone help me, please, thanks.
锕=錒 锿=鎄 皑=皚 嗳=噯 蔼=藹 霭=靄 爱=愛 嫒=嬡
<?php
mb_internal_encoding("UTF-8");
$search=" ";
$replace="','";
$string="锕=錒 锿=鎄 皑=皚 嗳=噯 蔼=藹 霭=靄 爱=愛 嫒=嬡";
echo str_ireplace($search,$replace,$string);
?>