Hey Guys , need some help with the code below :
$var1 = $images[0]; // Source Image
$var2 = $screens; // Screenshots
$var3 = "http://url/defaultimage.jpg";
Need a simple function to check whether $var1 = ( blank , Null , array) in which case it uses $var2 & if $var2 = ( blank , Null , array) , then it uses $var3 .
I got part of it working but still needs some work and i'm not very good with php :
$image = $var1;
if (($var1 == NULL) || ($var1 == "") || ($var1 == "Array") || (is_array($var1)))
{
$image = $var2;
}
if (($var2 == NULL) || ($var2 == "") || ($var2 == "Array") || (is_array($var2)))
{
$image = $var3;
}
$var1 = $images[0]; // Source Image
$var2 = $screens; // Screenshots
$var3 = "http://url/defaultimage.jpg";
Need a simple function to check whether $var1 = ( blank , Null , array) in which case it uses $var2 & if $var2 = ( blank , Null , array) , then it uses $var3 .
I got part of it working but still needs some work and i'm not very good with php :
$image = $var1;
if (($var1 == NULL) || ($var1 == "") || ($var1 == "Array") || (is_array($var1)))
{
$image = $var2;
}
if (($var2 == NULL) || ($var2 == "") || ($var2 == "Array") || (is_array($var2)))
{
$image = $var3;
}