Description :
Lets say I am fetching some data from a php page like below
<?php
include 'connect_to_database.php';
while ($data = mysqli_fetch_array(mysqli_query($con,"select * from myTable"),MYSQLI_BOTH))
{
echo $data['product'];
}
mysqli_close($con);
?>
now what is mysql_close($con);
doing there exactly is it closing the connection for this page only or as a whole disconnecting the website from database which has to be connected again to work .. further more I read writing exit
at the end of php is a very good practice as if we dont do this then the page keeps executing in the server thus occupies space ...
Can anyone explain ?