xyn Posted October 5, 2007 Share Posted October 5, 2007 Hey, I've come accross coding with simelar contents quite often; However I beleive it's and "AND" / "OR" statement on one line.. $s .= (($link == "") ? $d : "<a href=\"$link\">$d</a>"); Could someone explain what ? and : do. thanks Link to comment https://forums.phpfreaks.com/topic/71943-solved-basic-question/ Share on other sites More sharing options...
MadTechie Posted October 5, 2007 Share Posted October 5, 2007 () = if ? = then : = else its quicker than. if ($link =="") { $s .= $d; }else{ $s .= "<a href=\"$link\">$d</a>"; } Link to comment https://forums.phpfreaks.com/topic/71943-solved-basic-question/#findComment-362341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.