You are here: Re: Parse HTML ASCII « All PHP « IT news, forums, messages
Re: Parse HTML ASCII

Posted by IchBin on 10/10/02 11:51

McHenry wrote:
> "Ruben van Engelenburg" <ruben@NOSPAM.nl> wrote in message
> news:44a28738$0$31643$e4fe514c@news.xs4all.nl...
>> McHenry wrote:
>>> For example the following is retrieved as a price however it would be
>>> easier to extract using a regex if the code was first converted to a
>>> dollar sign:
>>>
>>> <h3>
>>>
>>> &#36;249,000
>>>
>>> </h3>
>>
>> Hi McHenry,
>>
>> You're probably looking for html_entity_decode():
>>
>> <?php
>> echo html_entity_decode('<h3>&#36;249,000</h3>');
>> ?>
>>
>> HTH.
>> Ruben.
>>
>> --
>> http://www.phpforums.nl
>
> When I run the example code above it outputs the HTML as it appears above
> and doesn't convert the ascii codes ?
>
>

when I run it I get $249,000

<?php
echo html_entity_decode('<h3>&#36;249,000</h3>');
?>

I am using PHP Designer and PHP version 5.1.4

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация