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

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

Final year project, please point me in the right direction
hi there for my final year project I'm aiming to build a php script shell to use as an expert system

PHP - HTML
Could anyone give me some GOOD sample links for php - html email tutorial.

Thanks!

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

re calling a function without including file
Hi,
i am new to programming in php, i was just checking the wordpress code and found out in the w

Number Format
Hi All,

I have number '000000000050085' I want to format it to 500.85 Can any one give me

Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on h

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.
Some code runs as perfectly valid code,

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