File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/autohyper.php

Recommend this page to a friend!
  Classes of Slavko Srakocic  >  B12 PHP FW  >  fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/autohyper.php  >  Download  
File: fwphp/glomodul/z_examples/book_video/03steinmetz_2008/ch05_txt_html/autohyper.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change:
Date: 2 months ago
Size: 252 bytes
 

Contents

Class file image Download
<?php
$stuff
= 'blah blah blah<a href="http://www.o--o.net">my site</a>
http://www.cnn.com/

blah blah'
;

print
"$stuff\n\n";

print
preg_replace('|(?<!href=")(https?://[A-Za-z0-9+\-=._/*(),@\'$:;&!?]+)|',
          
'<a href="$1">$1</a>',
          
$stuff);
?>


For more information send a message to info at phpclasses dot org.