PHP not selecting my first row from mysql database : <p>My connection to the database works fine. My application can display all my data, except the first row. When I run it locally through MySQL workbench, it fetches my first row, and every row after that. It is just my PHP code that is not getting the first row, and I am unsure why.    </p>

<pre><code>&lt;?php
//connect with database
$connect= new mysqli($host,$user,$pass,$db) or die("ERROR:could not connect to the database!");


$query="select * from college";
$result=$connect-&gt;query($query);


$jsonData = array();
while ($array = mysqli_fetch_assoc($result)) {
    $jsonData[] = $array;
}

echo json_encode($jsonData);
?&gt;
</code></pre>
