Jump to content


Photo

php wml entities


  • Please log in to reply
1 reply to this topic

#1 wardmaestro

wardmaestro
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 05 March 2006 - 05:32 PM

Hi

I have built a back end system for my WAP site to enable easy addition of content. However, ehen I add items like news with apostrophes then the text is inserted into the database as 'we’re all going to the zoo tomorrow' (we're all going to the zoo tomorrow). I try to use HTML_ENTITIES_DECODE in my php, which does convert it to an apostrophe but the sourse code stays the same and so does not display in all WAP browsers. How can I remedy this? Is there a PHP function that will convert the character entities stoted in the database to their numeric entities.

Thanks

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 05 March 2006 - 05:43 PM

yes.

have a look at this

[a href=\"http://uk.php.net/manual/en/function.get-html-translation-table.php\" target=\"_blank\"]html translation table[/a]

Are you using a wysiwyg editor? it maybe that that generates the special entities - use the above table to do a string replace or something similar.
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users