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:

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

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Array disappearing in foreach loop
Okay, I have this problem where an array will become undefined in a foreach loop.

Here is the

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

simple php table loop
Hi all,

I've the following code

<?php // Create category options

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