title: mysql query result in php variable
body: <p>Is there any way to store mysql result in php variable? thanks</p>
  
  <pre><code>$query = "SELECT username,userid FROM user WHERE username = 'admin' ";
  $result=$conn-&gt;query($query);
  </code></pre>
  
  <p>then I want to print selected userid from query.            </p>