read()) $lista[] = $elem; //I close the resource $d -> close(); //I retrun the array return $lista; } ?>