0

Hi Everyone.

Can someone assist me? I'm pulling data from a DB, If the first value is empty it should check the second one and if that is also empty assisgn value.

Hope it's understandable.

Regards

if(empty($veh_img)){
	$galpic="image.gif";
		}elseif(empty($disk_img)){
          $galpic="image.gif";
}else{
		 $galpic="$disk_img";
		}
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by LRNPHP
0

Like this?

if(empty($veh_img) AND empty($disk_img)){
    $galpic="image.gif";
}else{
    $galpic="$disk_img";
}

Edited by Beat_Slayer: n/a

0

Like this?

if(empty($veh_img) AND empty($disk_img)){
    $galpic="image.gif";
}else{
    $galpic="$disk_img";
}

Hi Beat_Slayer

It works 100% thanks for sharing your knowledge.
Enjoy your day.

Regards

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.