i have array can't seem retrieve info from. nested array?
print_r() results:
array ( [0] => array ( [0] => array ( [title] => hampton [day] => 1st , 3rd monday [time] => 7:30pm [contact] => jan boyd [phone] => 0438 584 558 [email] => ) [1] => array ( [title] => frankston [day] => 1st , 3rd wed [time] => 9:30am [contact] => vaness ogues-canele [phone] => 0420 834 791 [email] => ) ) )
the code using try retrieve info:
foreach( $groups $group ) { ?> <?php echo $group['title'] ?> <?php echo $group['day'] ?> <?php if ($group['time']) { ?> <?php } ?>
have tried going first array this?
foreach( $groups[0] $group ) { ?> <?php echo $group['title'] ?> <?php echo $group['day'] ?> <?php if ($group['time']) { ?> <?php } ?>
if possible, try 2 foreach loops:
foreach( $groups $tmp ) { ?> foreach ($tmp $group) { <?php echo $group['title'] ?> <?php echo $group['day'] ?> <?php if ($group['time']) { ?> <?php } ?> <?php } ?>
Comments
Post a Comment