I have a regular array that contains numbers from 1 to 14 that is generated by retrieving INTs from a SQL result column.
Using another query I'm returning another INT.
I'm searching for this INT in my array.
$key = array_search("$roomNb", $freeRooms);
However when I try to echo this key nothing appears. It is empty.
If I echo $freeRooms using a loop I get:
1
2
3
4
5
6
7
8
9
10
11
12
14
If I echo $roomNb I get
5
So I can't understand why I'm not getting anything in return. I should be expecting a key of 4 no? What could be causing this?