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....
there are 4 modes to create links...
1.
(>> <a href="http://www.litewarez.com">http://www.litewarez.com</a>
2.
(>> <a href="http://www.litewarez.com">Litewarez Home</a>
3.
(>> <a href="http://www.litewarez.com" class="this_is_css_class">Litewarez Home</a>
4.
(>> <a href="http://www.litewarez.com" class="this_is_css_class">http://www.litewarez.com</a>
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.
Code:
function make_link($url,$name,$class){
$link = '<a href="'.$url.'"';
if($class){
$link .= ' class="'.$class.'"';
}
$link .= $name ? '>'.$name.'</a>' : '>'.$url.'</a>';
echo $link;
}
there are 4 modes to create links...
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.