I’m comparing a string within an object to a string from a standard variable and even though they “look” the same when echoing them out, the if statement never finds that they match. Also, both values are text strings with no digits.
if($users[$x]->get_employee_id() == strtolower($employee_id)) {
$found = true;
}
What am I missing here?
(I also tried the strcmp function)
The id from the object has that character at the end… get rid of it. If you can’t edit the object, calling
trim()might work.