replacements


Posted on 16th Feb 2014 07:03 pm 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.

No comments posted yet

Your Answer:

Login to answer
264 Like 15 Dislike
Previous forums Next forums
Other forums

VAT
how should I deal with VAT?

if I have a product that costs £5.00 and VAT @ 17.5% (£0.87

Comma seperated implode & modifying returned string.
I have a PHP post form that posts up to 4 variables. I need whatever variables are passed to be comb

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

Code doesn't print what i wanted it too. Please help!
Hi there,

I wrote this code to mae it so that in the form before it that the user said their

iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped

if else problem, help please
i have this script that i made only i try to also put in a if else for for some reason the script is

Help building / using array
First - this is a cross-posting, if this is wrong I apologise! What started out as a MySQL query que

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash