Skip to content

Instantly share code, notes, and snippets.

@muskie9
Created April 2, 2021 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muskie9/a72a138c8dc8a197a1e9bf4283862f95 to your computer and use it in GitHub Desktop.
Save muskie9/a72a138c8dc8a197a1e9bf4283862f95 to your computer and use it in GitHub Desktop.
<?php
$albumData = [
[
'Title' => 'Album 1 Title',
'Image' => 'img/foo-bar.jpg',
],
[
'Title' => 'Album 2 Title',
'Image' => 'img/foo-bar-2.jpg',
],
];
foreach($albumData as $data){
//your output block
$data['Title']; // holds the title of the current album being looped over
$data['Image']; // holds the image path of the current album being looped over
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment