Jump to content

I can echo my a tag


unemployment

Recommended Posts

Does this have a syntax error? The link won't echo.  All that echoes is the companytag

 

$t = '<a href=\"../'.($r['accounttyperaw'] == '') ? 'c' : 'u'.'/'.($r['accounttyperaw'] == '') ? $r['companytag'] : $r['feedusername'].'\">'.ucwords($r['feedfirstname'].' '.$r['feedlastname']).' has updated</a>';

 

Link to comment
https://forums.phpfreaks.com/topic/238810-i-can-echo-my-a-tag/
Share on other sites

Write the string as:

<?php
$t =  '<a href="../'.(($r['accounttyperaw'] == '') ? 'c' : 'u').'/'.(($r['accounttyperaw'] == '') ? $r['companytag'] : $r['feedusername']).'">'.ucwords($r['feedfirstname'].' '.$r['feedlastname']).' has updated</a>';
?>

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/238810-i-can-echo-my-a-tag/#findComment-1227109
Share on other sites

Write the string as:

<?php
$t =  '<a href="../'.(($r['accounttyperaw'] == '') ? 'c' : 'u').'/'.(($r['accounttyperaw'] == '') ? $r['companytag'] : $r['feedusername']).'">'.ucwords($r['feedfirstname'].' '.$r['feedlastname']).' has updated</a>';
?>

 

Ken

 

Thanks for figuring this out Ken.  I guess I need extra paranthesis

Link to comment
https://forums.phpfreaks.com/topic/238810-i-can-echo-my-a-tag/#findComment-1227251
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.