Okay so I need to push the array that is fetched from a few different tables into a new array. I thought this would do it but it doesn't. A warning saying array_push() expects parameter 1 to be an array. There is probably something really simple that I have done wrong but Im new to all this PHP stuff so have no idea. I thought the parameter 1 is an array as an array is fetched from database.
Here's the code:
$newsfeed = array("apple");
$news = mysql_query("
SELECT * FROM news
UNION ALL
SELECT * FROM feature ORDER BY timestamp DESC LIMIT 1
")or die(mysql_error());
while($row = mysql_fetch_array($news))
{
$artist = mysql_query("
SELECT * FROM members WHERE artist='Y'
ORDER BY timestamp DESC LIMIT 2
")or die(mysql_error());
while($row1 = mysql_fetch_array($artist))
{
array_push($newsfeed, $row['title'], $row1['artistname']);
}
}
echo($newsfeed);