Hey there, I'm new to PHP (coming from the CFM world) and need to create the PHP equivalent of the CFM function yesNoFormat() to convert BIT values from the db into "Yes" or "No" in the html output.
Is this function syntax correct?...
$yesNoFormat = create_function('$a', 'if ($a == "1") echo "Yes"; else echo "No"; ');
$yesNoFormat(row[aBitField]);
I'm not getting an error on the page when I include that code, but when I use the function I get nothing in the output. I mean, if $a isn't equal to 1 or even "1" I should get "No" in the output all the time, right? I'm just getting nothing.
Any advice?