<? $dato = array(); for($i=0;$i<mysql_num_rows($resultado);$i++){ dato[$i] = mysql_fetch_assoc($resultado); } ?>