str_replace help


Posted on 16th Feb 2014 07:03 pm by admin

Hey there,

I'm a PHP newb, I'm having troubles with the str_replace function. I want to clean up bad html to valid xhtml, I am using:

Did you know?Explore Trending and Topic pages for more stories like this.
Code: $pee = str_replace('&', '&', $pee);
It works, but doesn't change & to &amp; when the content is inside of <blockquote><p>stuff here & there</p></blockquote>

can anyone assist?
No comments posted yet

Your Answer:

Login to answer
273 Like 24 Dislike
Previous forums Next forums
Other forums

Redirecting Admin
In my members table, I have a field called "perm" and it's set to zero for all members. Ho

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

Update data to upper case in parent/child tables
Hi Gurus!

In production we have a product table and which is being reference by many tabl

Escaped characters
I have a script that allows you to post news to the home page of my site. Along with the news is the

Multidimensional $_POST
Hello

How to get a single array from array of array (2 - dimension).
For example I have a

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

C++ API to Oracle dB
I need to perform a select command to the Oracle dB to obtain information from a table.
What libr

ALV grid with 2 headers
Hi Gurus,

I need to display ALV GRID as below.

Header1

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

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