Thread: HTML from text
View Single Post
  #4 (permalink)  
Old 05-10-2008, 07:27 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,236
Last Blog:
Passwords
Credits: 877
Rep Power: 20
John has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud ofJohn has much to be proud of
Send a message via AIM to John Send a message via MSN to John
Default Re: HTML from text

PHP Code:
#!/usr/bin/php -q
<?php

$content 
'<p><img src="http://forum.codecall.net/images/stories/news/Girard-Perregaux-Shopping-W.gif" border="3"
alt="Girard-Perregaux-Shopping-Watch" title="Girard-Perregaux-Shopping-Watch" width="550" height="468" /></p><p>The world becomes an
extremely alluring place when women take over. The proof of this is provided by the ww.tc 24 Hour Shopping, which gives the time in
twenty-four time zones, with its own particular interpretation of the planet: it indicates the time not in cities, but in places famous
for their fashion and luxury boutiques, such as Faubourg Saint-Honor&eacute;, Dubai or Ginza.&nbsp;</p><p>&nbsp;</p>'
;

preg_match('#(?<=<img src=").*?(?=")#'$content$image);

print_r($image);
?>
Output:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall

Last edited by John; 05-10-2008 at 08:01 PM.
Reply With Quote