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

HTML Viewer HIDE scrollbar
How can I disable scrollbars in a HTML Viewer control? I can't hide them. Even i have enough space b

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

How do i use vars in an array
Hiya peeps!

How do I use a var in an array. You will see $id but it isnt working.


question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

Calling strings from other php class
I have test1.php{
$string1;
$string2;
....
... //10 strings in this class <

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

multipart emiail forms
Hi All,

I am new to the boards and I've been working on a form (which is rather massive, imo

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

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