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

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

PHP, jAVASCRIPT setting input values, why isn't it working?
Hi:

I am calling this javascript:
<script language="javascript">

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

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

webpage with (simple) login & mysql-db
Hi all,

What I was looking for before was a multi-user password manager, web-based! The offer

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