I have to send the list of all the users through JSON to javascript. The problem is that I don't know the function to store all the data in one variables.
This is my code:
$sql = "SELECT * FROM ___ WHERE __ = ___ ";
$result = mysqli_query($conn, $sql);
while( /* from here I don't know which function should be inserted */)
$json = json_encode('something');
echo $json;