| SitePoint Sponsor |




Last edited by runrunforest; Dec 31, 2008 at 22:22. Reason: question changed
Does that help?PHP Code:$groups = array();
while ($row = mysql_fetch_assoc($result)) {
$groups[$row['id']][] = $row;
}
print_r($groups);




Not quite.
I need something like this, say "title" is from table listing, "name" is from table visitor. I have one title and 2000 names.
On the top of the page i want:
Code PHP:$rows = mysql_fetch_assoc($result) { echo $rows[title] ; }
somewhere else in the page, I want all the name appear here.
Code PHP:while ( $rows = mysql_fetch_assoc($result) { echo $rows[name]; }
Bookmarks