title: How to call multiple values from array in while loop in php
body: <blockquote>
    <p>How to add multiple values in while loop, I can only add two values as per my level, one is id and other one is title, I want to add more fields like I am getting from the server please help anyone</p>
  </blockquote>
  
  <pre><code>  $limitStart = $_POST['limitStart'];
      $limitCount = 15;
       if(isset($limitStart) || !empty($limitstart)) {
        $con = mysqli_connect($hostname, $username, $password, $dbname);
        $query = 'SELECT id, title, caption, description, featured_image, logo, category_sku, industry_sku 
                  FROM works ORDER BY title limit '.$limitStart.','.$limitCount .'';
        $result = mysqli_query($con, $query);
         $res = array();
         while ($resultSet = mysqli_fetch_assoc($result)) {
          $res[$resultSet['id']] = $resultSet['featured_image'];
        }
         echo json_encode($res);
       }
  </code></pre>