I have a string like this:
$str = "{gfgd}i:123;a:7:{gfgd}i:5;a:35:";
And I want to replace it to:
$str = "{gfgd},{gfgd},";
I want to use ereg_replace with it and replace this kind of phrase:
"i:[0-9]a:[0-9]:" into "," sign.
I try it:
$str = "i:143;a:5:{gfgd}i:123;a:7:{gfgd}i:5;a:35:";
$text = ereg_replace("/^i:[0-9]+;a:[0-9]+:+$", ",", $str);
But i doesn't work. Can you help me? Thank you in advance