I am creating a page on my website that loads my events from a facebook page. I have everything working properly except the bottom part where it displays a list of members attending. It displays the members and their info/links properly, only it only puts one per row and displays them all in a continuous column. I would like for it to display the attending members in a row (maybe 3 or 4 per row), then start start a new row. I need it to do this dynamically since each event will have a different number of attendees. Some of my events have hundreds and the continuous column will be way too long. I have made a few notes in the php that may help understand some of what’s going on, plus a note showing which table in the php needs to have the results displayed in continuous rows. Please offer any help you can!!
Here is a link to the page as it is now: http://schornpromotions.com/show_events2.php
Here is my current code:
[php]
<?php
//heading
echo "
";
//fan page id
$event_result = $pull_fb->getEvents( '275144562517495' );
//looping through retrieved data
foreach( $event_result as $key => $value ){
//The pattern string I used 'l, F d, Y g:i a'
//will output something like this: July 30, 2015 6:30 pm
//getting 'start' and 'end' date,
//'l, F d, Y' pattern string will give something like: Thursday, July 30, 2015
$start_date = date( 'l, F d, Y', strtotime($value['start_time']) );
$end_date = date( 'l, F d, Y', strtotime($value['end_time']) );
//getting 'start' and 'end' time
//'g:i a' will give something like 6:30 pm
$start_time = date( 'g:i a', strtotime($value['start_time']) );
$end_time = date( 'g:i a', strtotime($value['end_time']) );
//display the album details
echo "
";
echo "
";
echo "";
echo "";
echo " ";
echo "";
echo "";
echo " ";
echo "";
echo " | ";
echo " ";
echo "";
echo " | ";
echo " ";
echo " ";
echo " | ";
echo "";
echo " ";
echo "";
echo " | ";
echo " ";
echo "";
echo "
| ";
echo " ";
echo "";
echo "";
echo "";
echo "Date|Time: | ";
echo "";
if( $start_date == $end_date ){
echo "{$start_date} - {$start_time} to {$end_time}";
}else{
echo "{$start_date} {$start_time} to {$end_date} at {$end_time}";
}
echo " | ";
echo " ";
echo " | ";
echo " ";
echo "";
echo "
| ";
echo " ";
echo "";
echo "";
echo "";
echo "Location: | ";
echo "" . $value['location'] . " | ";
echo " ";
echo " | ";
echo " ";
echo "";
echo "
| ";
echo " ";
echo "";
echo "";
echo "";
echo "Full Details: | ";
echo "" . $value['description'] . " | ";
echo " ";
echo " | ";
echo " ";
echo " ";
echo " | ";
echo " ";
echo " ";
echo " | ";
echo "
";
echo "";
echo "
| ";
echo "
";
echo "";
echo "";
echo " ";
echo "";
echo "
" . $value['attending_count'] . " Attending
| ";
echo "
" . $value['unsure_count'] . " Maybe Attending
| ";
echo "
" . $value['all_members_count'] . " Invited
| ";
echo " ";
echo " ";
echo " | ";
echo "
";
echo "";
echo "
| ";
echo "
";
echo "";
//THIS IS THE TABLE I NEED TO HAVE THE RESULTS DISPLAY IN ROWS
echo "";
//get people invited to the event
$event_members = $pull_fb->getEventMembers( $value['eid'] );
//loop through event members
foreach( $event_members as $event_member ){
//get profile pic and name of the event member
$result = $pull_fb->getProfileDetails( $event_member['uid'] );
$pic_square = $result[0]['pic_square'];
$name = $result[0]['name'];
//display event member details
echo "";
//small square profile pic
echo " ";
echo " ";
echo " ";
//provide link to event member profile
echo " ";
//rsvp status
echo " RSVP Status: {$event_member['rsvp_status']} ";
echo " ";
}
echo " | ";
//END OF TABLE NEEDING RESULTS DISPLAYED IN ROWS
echo "
";
echo "
";
echo "
";
}
?>
[/php]