Results 1 to 1 of 1
-
2nd Dec 2008, 01:28 AM #1OPMemberWebsite's:
litewarez.net litewarez.com triniwarez.comPHP Function (Link_Maker)
hey this is just a simple bit of code that i just made for another project and thought it might be usfull to ppl so here it is....
Code:function make_link($url,$name,$class){ $link = '<a href="'.$url.'"'; if($class){ $link .= ' class="'.$class.'"'; } $link .= $name ? '>'.$name.'</a>' : '>'.$url.'</a>'; echo $link; }
1.
Code:make_link('http://www.litewarez.com','','');
2.
Code:make_link('http://www.litewarez.com','LiteWarez Home','');
3.
Code:make_link('http://www.litewarez.com','LiteWarez Home','this_is_css_class');
4.
Code:make_link('http://www.litewarez.com','','this_is_css_class');
as you can see this small snippep has good functionality and as long as you have an url you can create a link..
also its greate for your templates if you use this throughout your scripts..
peace.litewarez Reviewed by litewarez on . PHP Function (Link_Maker) hey this is just a simple bit of code that i just made for another project and thought it might be usfull to ppl so here it is.... function make_link($url,$name,$class){ $link = '<a href="'.$url.'"'; if($class){ $link .= ' class="'.$class.'"'; } $link .= $name ? '>'.$name.'</a>' : '>'.$url.'</a>'; echo $link; Rating: 5Join Litewarez.net today and become apart of the community.
Unique | Clean | Advanced (All with you in mind)
Downloads | Webmasters
Notifications,Forum,Chat,Community all at Litewarez Webmasters
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
function backlink help
By Chris2k in forum Web Development AreaReplies: 13Last Post: 26th Apr 2012, 09:43 PM -
time ago function
By Chris2k in forum Web Development AreaReplies: 2Last Post: 21st Jan 2012, 05:58 AM -
[PHP] }else{ Function 3 parts
By viruz99 in forum Web Application/Script SupportReplies: 4Last Post: 17th Jan 2012, 01:33 AM -
[Help] Fix PHP function
By m1rr0z in forum Web Development AreaReplies: 0Last Post: 15th Apr 2011, 09:40 AM -
Need faster function - help :(
By Porsche_maniak in forum Web Development AreaReplies: 7Last Post: 11th Dec 2010, 07:54 PM
themaPoster - post to forums and...
Version 5.38 released. Open older version (or...