|
Posted by furfey@gmail.com on 12/06/07 23:43
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.
Navigation:
[Reply to this message]
|