Help with If else if

Gu®u <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAHmJ=UvFFHfo_RM-XysJAdO0TDcFm-xZ=m68jGJy1yneU8Uzdw@mail.gmail.com>
Hi,

Please help me with this code. I have 2 different fields in mysql table.
What I want is if the field is empty don't show the image. Please look at
the code below.


<?php


          if($search->plugin->ListViewValue()=="")
          {

           echo '<a href="'.$search->facebook->ListViewValue().'"><img
src="images/facebook.gif" width="22" height="23"/></a></a>';
          }
          if($search->facebook->ListViewValue()=="")
          {

          echo '<a href="'.$search->plugin->ListViewValue().'"><img
src="images/twitter.gif" width="22" height="23"/></a></a>';
          }


          else if($search->plugin->ListViewValue()=="" &&
$search->facebook->ListViewValue()=="")
{

echo "";
}

else
          {

          echo '<a href="'.$search->plugin->ListViewValue().'"><img
src="images/twitter.gif" width="22" height="23"/></a></a>'.'<a
href="'.$search->facebook->ListViewValue().'"><img
src="images/facebook.gif" width="22" height="23"/></a></a>';

          }


          ?>


-- 
*Best,
*
*Gu®u*
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.