title: How to store an array into a session variable in php
body: <p>//Returns 10 question from questions table</p>
  
  <pre><code>$result = mysqli_query($con,"SELECT question FROM questions ORDER BY rand() LIMIT 10' ");
  while($row = mysqli_fetch_row($result))
  {
  $que[]=$row[0];
  }  
  </code></pre>
  
  <p>Now I need to store this whole set of <code>$que[]</code> in a session variable. (i.e 10 questions)</p>
  
  <p>Something like this</p>
  
  <pre><code>$_SESSION['question'] = $que[]; 
  
  $my_array[] = $_SESSION['question'];
  </code></pre>
  
  <p>so that <code>$my_array[0]</code> returns first question, <code>$my_array[1]</code> returns second questions and like that. </p>
  
  <p>(Thanx for the help in advance)</p>