If you leave a URL in the comment form of a WordPress blog, it will be automatically transformed into a hyperlink. If you want to implement the same functionality in your own website or web app, you can use the following code:





If you leave a URL in the comment form of a WordPress blog, it will be automatically transformed into a hyperlink. If you want to implement the same functionality in your own website or web app, you can use the following code:
Tags: transform url
Code Snippet:
$url = "Jean-Baptiste Jung (http://www.xentrik.net)";
$url = preg_replace("#http://([A-z0-9./-]+)#", '$0', $url); ActionScript - ActionScript 3 - Apache - AppleScript - ASP - Assembler - Bash - C - C# - C++ - ColdFusion - CSS - Delphi - DOS Batch - Fortran - HTML - iPhone - Java - JavaScript - jQuery - Lisp - MatLab - Maxscript - MXML - MySQL - Objective C - Other - Pascal - Perl - PHP - PL SQL - Prolog - Pseudocode - Python - Rails - SmallTalk - Smarty - SML - SPSS - SQL - SVN - Symfony - TCL - VB.NET - Visual Basic - XHTML - XML - XSLT
© 2000-2012 Xentrik.Net
