Código PHP:
<?
if ($noticia_array = noticia());
do_html_menu_noticia($noticia_array);
Código PHP:
<?
function noticia()
{
if (!($conn = db_connect()))
return false;
$result = mysql_query( "SELECT noticiaID, noticia FROM noticia");
// extraigo noticiaID y noticia
if (!$result)
return false;
$noticia_array = array();
for ($count = 1; $row = mysql_fetch_row ($result); ++$count)
{
$noticia_array[$count] = $row[0];
// aca se almacena noticiaID, como hago para almacenar mi segundo dato ?
}
return ($noticia_array);
}
////////////////
function do_html_menu_noticia($noticia_array)
{
foreach ($noticia_array as $noticiaID)
{
// en este imprimo noticiaID y noticia,
}
}
?>
* si alguien podria corregir este codigo. porfavor. recien llevo poco en php =)