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

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

cURL proxy
Okay here is the thing... i know how to add proxys

Code: curl_setopt($ch, CURLOPT_PROXYTYPE,

pop3 and fsockopen
So I am able to connect to the pop3 server, log in, and check how many messages there are. I am hav

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

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

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

Thanks!

Slashes
Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and i

Code working in IE but not FireFox
I created a dynamic navigation list for my website based off of a table in my database. The code is

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