SyntaxFix
Write A Post
Hire A Developer
Questions
You need to alias the aggregate using the as keyword in order to call it from mysqli_fetch_assoc
as
mysqli_fetch_assoc
$result=mysqli_query($conn,"SELECT count(*) as total from Students"); $data=mysqli_fetch_assoc($result); echo $data['total'];