Log in

View Full Version : iif help


sabret00the
12-14-2004, 01:40 PM
ok i know you can use iif's to check is a value is there, but can you use it to match a value?

i.e. $grps_image_name = iif($showgroup['image_name'] == noimage.gif, "<img src=\"" . $vboptions . "/" . $stylevar[image_dir]) . "/grps_noimage" . $randomimagenumber . "\" alt=\"" . $grps_showgroup[title] . "\" />", "Location Of Image Somehow. ");


and if so what am i doing wrong? i tried to look it up but it's not even in my php book :(

it's giving me this error btw
[b]Parse error: parse error, unexpected ',' in htdocs\groups\groups.php on line 97

Natch
12-14-2004, 02:36 PM
$grps_image_name = iif($showgroup['image_name'] == "noimage.gif", "<img src=\"" . $vboptions[bburl] . "/" . $stylevar[image_dir]) . "/grps_noimage" . $randomimagenumber . "\" alt=\"" . $grps_showgroup[title] . "\" />", "Location Of Image Somehow. ");

sabret00the
12-14-2004, 03:39 PM
thanks natch, just what i needed :)