Basically I have the following code :
unset($items[array_search($i,$items)]);
When the key is not found the array_search returns false which is equivalent to returning 0, which results in deleting the element 0 of the array if an item value is not found.
Any Workaround for this?