...

View Full Version : trying to convert #039; to an apostrophe



Bobafart
07-15-2007, 02:42 PM
Hello,

I am trying to convert this:

Dodgers#039; Lowe keeps Bonds stuck at 751

to this:

Dodgers' Lowe keeps Bonds stuck at 751

I am using:



html_entity_decode($headline)


but it isn't converting #039; to '

thanks in advance

rafiki
07-15-2007, 02:46 PM
urldecode()? should work possibly :)

CFMaBiSmAd
07-15-2007, 03:00 PM
The proper html encoding of a ' is (with no space) - & #039;

Also, if you read the manual for the html_entity_decode(...) function, you will learn that to get it to decode a single quote, you must use the second parameter and set it to ENT_QUOTES - http://php.net/html_entity_decode



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum