Link to home
Start Free TrialLog in
Avatar of greenbug2002
greenbug2002

asked on

Replace a match opccurance in a string only once vith php4

hi i have the following:
$replaceing = array("<td bordercolor=\"#000000\">$pname</td>");
$replaceing2 = array("<td bordercolor=\"#000000\"colspan=\"$count\" ><div align=\"center\">$pname</div></td>");
$table = str_replace($replaceing, $replaceing2, $table);

which replaces all found instances in $table but i need to only replace the first instance but i am stuck on php4
please help
Avatar of evguen
evguen

ASKER CERTIFIED SOLUTION
Avatar of dr_dedo
dr_dedo
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial