replacements

Posted on 16th Feb 2014 by admin

I have a variable in my PHP script like

ASSFDDDDDDDDDDDDDASDDDDDDDDARYTRHKKHHHHHHHHHHH and positions 5-10

I want to replace these positions with another color .

$newpat="<font color=blue>$pat</font>";

can someone tell me what function to use and how, I tried string_replace, but didn't work. I did not know hoe I could tell it to replace specific positions and multiple at a time.

Other forums