View Single Post
Old 09-09-2009, 04:49 AM   #1 (permalink)
Randy
The Acquainted
 
Randy's Avatar
 
Join Date: May 2007
Location: Your G/F's Closet
Posts: 114
Thanks: 7
Randy is on a distinguished road
Default foreach statement?

Alright so I am looking to create a foreach statement using mysql query. I am not sure how I can do this seeing as how it requires an array_expression and value.

Here's my code:

PHP Code:
// Retrieve Data From The Database
$query 'SELECT * FROM entries ORDER BY DESC ID';

// Run The Above MySQL Query
$results 'mysql_query($query)'
How can i use the foreach statement to use the data over and over for each entry that has the ID tag.

Thanks,
Randy
__________________
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25 - Andrew Rutherford
Send a message via AIM to Randy Send a message via MSN to Randy
Randy is offline  
Reply With Quote