title: How to display data from specific table row columns in the database with MySQLI vs MySQL
body: <p>I am still really new to MySQL and even newer to MySQLI. I am trying to update my website with MySQLI and I can't seem to fix this last issue. </p>
  
  <p>My website is a single page site with 50 categories on the page. Each category has a category title. I have a table in the database with all 50 category titles and id's. I was using MySQL/PHP to display each category title at the top of each category by choosing the row and column specifically. Here is my code..</p>
  
  <p>The Query:</p>
  
  <pre><code>$query_meta = mysql_query("SELECT * FROM `categories`", $connection);
      if (!$query_meta) {
          die("Connection Failed: " . mysql_error());
      }
  
  $meta_query_result = array();
  
  while( $row = mysql_fetch_assoc($query_meta) ) {
      $meta_query_result[$row['id']] = array('url' =&gt; $row['url'], 'name' =&gt; $row['name'], 'title' =&gt; $row['title']);
  }
  </code></pre>
  
  <p>The Echo Statement:</p>
  
  <pre><code>&lt;h2&gt;&lt;?php echo $meta_query_result[1]['name']; ?&gt;&lt;/h2&gt;   
  &lt;h6&gt;&lt;?php echo $meta_query_result[1]['title']; ?&gt;&lt;/h6&gt;
  </code></pre>
  
  <p>This allows me to choose the row and the column I want to display.</p>
  
  <p>How can I redo this in MySQLI? Thanks in advance!</p>