I have My code Below. I have a function "getdet" that return array of record,but i cant able to print the all records the codes displaying only the first records may time. Pls help to solve this issue.
<?php
function getdet($qry){
global $con;
$Selecting=mysqli_query($con,$qry);
$Fetch=mysqli_fetch_array($Selecting);
return $Fetch;
}
$qry="SELECT * FROM `tbs_employee` WHERE EmpId='1' limit 1";
$GetData=getdet($qry);
$i=0;
while($GetData){
echo $i."-".$GetData['EmpId'].":".$GetData['EmpName']."<br>";
$i++;
}
?>
Below is my Table
Here is my result
0-1:Fst Employee
1-1:Fst Employee
2-1:Fst Employee
3-1:Fst Employee
4-1:Fst Employee
5-1:Fst Employee
6-1:Fst Employee
.
.
.
infinity
