Page 1 of 1

Text link in PHP code

Posted: Fri Apr 04, 2008 9:53 am
by dbldee
Hello everyone
Some very useful and interesting resources in this forum.
I could use some help with the following

Code: Select all

 
if ($config['mod_rewrite'] == 'YES') { 
                    $template_listing->set('www', '<a href="'.BASE_URL.'/out-'.$f['selector'].'.html" target=_blank class=textlink>'.$lang['listing_visit_website'].'</a>');
                } else {
                    $template_listing->set('www', '<a href="'.BASE_URL.'/listing_out.php?id='.$f['selector'].'" target=_blank  class= textlink>'.$lang['listing_visit_website'].'</a>');  
 
the class textlink is set as a clickable link
the font is adjusted with css
a.textlink{font-weight:bold;color:#FF0000;font-size:16px;}

the problem is the syntax of textlink to produce the desired font or is something else required?

I 've tried "textlink" and 'textlink' and '"textlink'" to no sucess.

Any thoughts or sugestions would be appreciated.

Re: Text link in PHP code

Posted: Fri Apr 04, 2008 2:43 pm
by Christopher
You need to escape depending on the type of quotes:

Code: Select all

'class="textlink">'
'class=\\'textlink\\'>'
"class=\"textlink\">"
"class='textlink'>"