Jump to content


Photo

html chars


  • Please log in to reply
5 replies to this topic

#1 wolves

wolves
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 16 March 2006 - 07:31 PM

how to convert this "&acute" html char to real value of it?

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 16 March 2006 - 07:45 PM

Use a semicolon after or it or the value instead of the name: & # 1 8 0 ; (without the spaces)

Info: PHP Manual


#3 wolves

wolves
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 16 March 2006 - 07:54 PM

I can't modify the string that I get, because it's became from a thirdparty script

It's ok to output in the broswer, but I can't use for sql selects/inserts . . . .

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 16 March 2006 - 08:08 PM

Are you using the function mysql_real_escape_string() on your data being inserted into your database? If not, you should be.

Ken

#5 wolves

wolves
  • Members
  • PipPipPip
  • Advanced Member
  • 65 posts

Posted 16 March 2006 - 08:12 PM

I need the real value of &aacute, &bacute . .. . . ..

php doesn't have a native function to convert it?

#6 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 16 March 2006 - 09:06 PM

Look at the function [a href=\"http://www.php.net/html_entity_decode\" target=\"_blank\"]html_entity_decode[/a]().

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users