So this is getting on my nerves right now
I have an associative array that I populate from another array:
foreach ($possible_unavailable as $p) {
$aux[] = array('date' => $p['date'], 'status' => -1);
}
var_dump($aux);
And then I do the following:
foreach ($aux as $pu) {
var_dump($pu['date']);
var_dump(array_search($pu['date'], $aux));
}
This is the output:
array(2) {
[0]=>
array(2) {
["date"]=>
string(10) "2014-09-01"
["status"]=>
int(-1)
}
[1]=>
array(2) {
["date"]=>
string(10) "2014-09-05"
["status"]=>
int(-1)
}
}
string(10) "2014-09-01"
bool(false)
string(10) "2014-09-05"
bool(false)
Why "array_search($pu['date'], $aux)" is not returning true?