$sql = mysql_query("SELECT COUNT(id) as total FROM articulos"); $array = mysql_fetch_array($sql); $total_de_registros = $array['total'];