For this code:
<?php
$data = array('0' => 'A_VALUE');
foreach ($data as $key => $value) {
if ($key == "Something to match the key on") {
print_r($key);
print_r('key matches');
}
}
I get this output
0key matches
Online example here: http://3v4l.org/dKOWq#v431
I cannot for the life of me work out why I am getting this. The comparison should clearly return FALSE.
Can someone explain this to me?