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

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

Help With Showing Users On the Index Page
Ive got this code which works just how i want it to.

Code: <?
$timenow=time();

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

Ariba 9r - SAP MM Integration
Hi experts,

The standard Ariba adapter for 9r creates a relationship between Cost Centers

Page not Loading After Test
Hey All

It seemed that an inlcude statement wasn't working for some reason, so I tried a more

constructor ?
i have written this program and made 3 constructors in the class and i want to call them in the main

Calculating n! using vector
#include
#include
#include

using

Which practice of iteration through containers is preferred
In the "real world" what kind of loop do most people use to iterate through a container like a vecto

Creating a db with a query
Hello everyone.
I'm having troubles creating a db with a query.
I'm reading a book called PHP

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

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