Posted by The Natural Philosopher on 12/07/07 02:32
furfey@gmail.com wrote:
> On Dec 6, 6:39 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>> On Fri, 07 Dec 2007 00:16:12 +0100, fur...@gmail.com <fur...@gmail.com>
>> wrote:
>>
>>> Is it possible to take an if contruct like this:
>>> if ($mmaaccess == "yes") {
>>> print "<img src='images/mma.jpg'>";
>>> } else {
>>> print "<img src='images/oa.gif'>";
>>> }
>>> and turn the whole thing into a variable $accessimage
>>> I can't figure out how to wrap the whole thing.
>> $accessimage = $mmaaccess == "yes" ? "<img src='images/mma.jpg'>" : "<img
>> src='images/oa.gif'>";
>> --
>> Rik Wasmus
>
> Perfect! Thanks a lot.
So good, he said it twice!
[Back to original message]
|