i have $news=array("latest","sports","weather");
how can i have $news (array) where "latest","sports","weather" is in my table
You mean fill the array with results from a SQL query?
yes
$sql = "SELECT blah FROM table"; $res = mysql_query($sql); if(mysql_num_rows($res) > 0) { $array = array(); while($r = mysql_fetch_array($res)) { $array[] = $r['blah']; } }