hello, I have this common snippet of code for a select list being generated by php/mysql query:
<option value="<?=$db->col["short_name"]?>" <?=($state)==($db->col["short_name"])?"selected":""?>>
So, I wanted to transpose this for a query, where we're already in php:
$db->query("SELECT * FROM emails_archive WHERE eid='".$eid."'");
I want to replace $eid with something like:
<?=($var)=="users"?"uid":"eid"?>
However, I don't need the <? since I'm already in PHP at this point of the code. How can I take advantage of the shorthanded code? Would this work:
[=($var)=="users"?"uid":"eid"]
Thanks so much!