this question is just for fun and maybe learning a PHP shorthand trick (if exists) Let\'s assume that I have this code:
$item = $this->get_item($id); $item =
You can use reset($array) to reset the internal array position and return the value of the first element.
reset($array)