function is deprecated in php 7.2.2, how to fix it? : <pre><code>function selectLecturer($lecturer_id) { 
    $sql=mysqli_query($con,"SELECT * FROM lecturer WHERE id='$lecturer_id'");
    $row=mysqli_fetch_array($sql);
    echo $row['name']." ".$row['surname'];

}

selectLecturer(1);
</code></pre>

<p>This was working in old PHP version, I upgrade my server to php 7.2.2, this function code is not working,
How can i fix it?</p>
