Re: Help with If else if
| From: | Matijn Woudt | Date: | Tue, 13 Mar 2012 14:44:12 +0000 |
| Subject: | Re: Help with If else if | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-48218@lists.php.net to get a copy of this message | ||
On Tue, Mar 13, 2012 at 3:06 PM, Gu®u <nagendra802000@gmail.com> 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