0

I have a problem with this code. When I use == to compare $row['request_from_id'] and $userId everything is right, but when I use === return always false. I don't know why. I konw that $row['request_from_id'] return string, so w hat I should do that $row['request_from_id'] and $userId be the same type ?

 while ($row = $query->fetch()) {
            $messages[] = new Message(
                $row['request_from_id'] === $userId,
                $row['avatar'],
                $row['name'],
                $row['message']);
        }
display11
  • 1
  • 1

0 Answers0