This one has been giving me fits for a couple of hours now, and I am not sure where to look for a solution. Using the code below, I want to create one variable that users can either view or hide on a list using a javascript expand/collapse button. The expand collapse works fine with static data, and it will display data coantained in a php variable. However, it will not handle rows of table cells, or php functions that are called from within it (using DIV tags).
So my question is this: is there any way that I can create one variable ($activity_item ) from the array below that would contain data from multiple rows that I could then call into the DIV tag?
for ($p=0; $p < $activity_results; $p++) {
$progress_row = mysql_fetch_array($activity_query);
$activity_type = $progress_row['activity_type'];
$progress_mins = $progress_row['time_spent'];
$progress_date = $progress_row['progress_date'];
$activity_item = "$progress_mins mins of $activity_type on $progress_date;
}