Re: Help with If else if

Matijn Woudt <[email protected]>
Newsgroups gmane.comp.php.database
Message-ID <CAC_gtuM+bUchAjs-R1TVaX5WXZr0+fyvg7nFdcfdokKr3Fyc0A@mail.gmail.com>
On Tue, Mar 13, 2012 at 3:06 PM, Gu®u <[email protected]> wrote:
> The issue is both the images are echoing and no if else statement is
> working.
>

First of all, please bottom post on this (and probably any) mailing list.

You should perhaps provide what the contents of
$search->plugin->ListViewValue()=="" and
$search->facebook->ListViewValue()=="" is.
Though, if I understood you correctly, it would be as simple as:
$facebookEnabled = $search->facebook->ListViewValue()!="";
$twitterEnabled = $search->plugin->ListViewValue()!="";
if($facebookEnabled)
         {

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

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

- Matijn

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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.