Here i want to compare two array results where the results looks like this,array1 looks like this
array(7) { [0]=> string(6) "M" [1]=> string(7) "T" [2]=> string(9) "W" [3]=> string(8) "T" [4]=> string(6) "F" [5]=> string(8) "S" [6]=> string(6) "S" }
array2 looks like this
array(7) { [0]=> string(5) "15:00" [1]=> string(5) "14:00" [2]=> string(5) "13:00" [3]=> string(0) "" [4]=> string(5) "12:00" [5]=> string(5) "11:00" [6]=> string(5) "10:00" }
here i want to compare the first value of array1 with the first value of array2row with the second and if the value return true it should perform a function and if the value return empty it should perform another function
so i had done my code like this
<?php foreach($array1 as $index => $val)
{
foreach($array2 as $index2 => $val2){?>
//here i want to compare $val with $val2 to check $val2 is not empty or not
<?php }
}?>