I have eperienced a very strange issue and I can't get my head around it.
I actually have 2 value which PHP says are NOT equal, when they do equal in my eyes.
I have 2 variables:
$pattern = array('/index/' => 'index');
$uri = $_SERVER['REQUEST_URI'];
$array_key = array_keys($pattern);
echo $array_key[0];
echo $uri;
Actually, when I echo both of these, I get the exact same text in my browser:
/index/
However if I do the following:
if ($array_key[0] == $uri) {
echo 'Equals';
} else {
echo 'Not Equals';
}
It ALWAYS gives me that they do NOT equals.
I do not know why is this, but my mind is kinda messed up right now. Can anyone please help me?