Skip to content

Instantly share code, notes, and snippets.

@brunomonteiro3
Created February 27, 2017 18:53
Show Gist options
  • Save brunomonteiro3/89c394d9a2708a4968f3842af198bdde to your computer and use it in GitHub Desktop.
Save brunomonteiro3/89c394d9a2708a4968f3842af198bdde to your computer and use it in GitHub Desktop.
PHP array with multiple attributes
<?php
$items = array();
$items[] = array(
'attr1' => 'value1',
'attr2' => 'value2'
);
foreach ($items as $item) :
echo $item['attr1'];
endforeach;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment