I want to run the code on the basis or values returned from php array. If value is returned as disabled , offer with disabled status will not be matched.
This line of code is working fine .
if ($condition1 >= $offer1 AND $condition2 >= $offer2 AND
$condition3 >= $offer3 AND $condition4 >= $offer4 )
{ //run code }
else { //some error messages }
$condition1 and all are numeric value
$offer1 and all are numeric value
Sample output and array values
while($row = mysql_fetch_array($sql))
{
$offerstatus[] = $row['offer_status'];
//some more output
}
Values stored in this array $offerstatus[] = enabled or disabled
these values are stored with reference to offer
Sample Values
offer status
offer1 enabled
offer2 enabled
offer3 disable
offern disable
or
condition offer status
50 51 enabled
100 99 enabled
122 865 disable
NNN offern disable
I want to run the above query based on values returned from this array $offerstatus[] .so that only those conditions are matched whose values are enabled.
Question:
I want to run this code for all the values that are retunred as enabled , and want to match those conditions.
On the basis of sample Values
The above should automatically be turned like this
if ($condition1 >= $offer1 AND $condition2 >= $offer2 )
{ //run code }
else { //some error messages }
Please let me know if the question is not well clarified.