I need to Ignore the variables in IF condition which have the value "All".
Here are the conditions. $one and $two are GET/POST
variables
case1: If $one == 'All' and $two = 'Sometext'
if($two == $DynamicValue2)
{
//display data
}
Case2: If $one == 'text' and $two = 'All '
if($one== $DynamicValue1)
{
//display data
}
Case3: If $one == 'text' and $two = 'text'
if($one == $DynamicValue1 && $two == $DynamicValue2)
{
//Display Data
}
Case4: If $one == 'All' and $two = 'All'
No need to write/ Check IF condition here.
I tried the following code but doesn't work
if(isset($one) && $one!= 'All')
{
if($one == $DynamicValue1): // First IF
}
if(isset($two) && $two!= 'All')
{
if($two == $DynamicValue2): // Second IF
}
//dispaly data
if(isset($one) && $one!= 'All')
{
endif; // to close First IF condition
}
if(isset($two) && $two!= 'All')
{
endif; // to close Second IF condition
}
I thought the above code satisfies all the cases which I've mentioned here. But no use. Any suggestions?
if(cond){if(other){//do stuff}}
– Steveif (..) { if (..) { .. } }
blocks. – deceze