I need to get the votes of the candidates that are in mysql and generate the percentage of votes that each had. How can I view the result since it is within a while?
$sql = mysql_query("SELECT * FROM candidatos ORDER BY nome_candidato");
while($ca = mysql_fetch_array($sql)){
$id_candidato = $ca['id_candidato'];
$nome_candidato = $ca['nome_candidato'];
$votos = $ca['votos'];
}