title: get an array output of a Stored Procedure in mysql
body: <p>I have created a stored procedure to count the number of works for each technician using the ID of that technicain and the intended year as a inputs to that stored procedure, but I have stucked to . . . 
  How can I get an array of output in that procedure so that <strong><em>I can use it later in my code in php</em></strong> for example.
  Here is my stored procedure: </p>
  
  <pre><code>        DROP PROCEDURE `work_count`;
  CREATE DEFINER=`root`@`localhost` PROCEDURE `work_count`(IN `id` INT, IN `yearInput` INT) NOT DETERMINISTIC NO SQL SQL SECURITY DEFINER
  BEGIN 
      SET @x := 1; 
      WHILE @x&lt;13 DO 
         SELECT COUNT(work.workType) 
         FROM work 
         WHERE year(workDate)=yearInput 
            AND work.technicianID = id 
            AND month(workDate)= @x; 
         SET @x := @x+1; 
      END WHILE; 
   END
  </code></pre>