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 Quote 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>"; } Quote Link to comment https://forums.phpfreaks.com/topic/71943-solved-basic-question/#findComment-362341 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.