Created
February 27, 2017 18:53
-
-
Save brunomonteiro3/89c394d9a2708a4968f3842af198bdde to your computer and use it in GitHub Desktop.
PHP array with multiple attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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