You are here: Re: wrapping an if contruct « PHP Programming Language « IT news, forums, messages
Re: wrapping an if contruct

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!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация