Guest User

Untitled

a guest
Sep 30th, 2017
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.80 KB | None | 0 0
  1. <?php
  2. //edit this array
  3. $contacts = array(
  4.   array('name' => 'Alena Holligan', 'email' => '[email protected]'),
  5.   array('name' => 'Dave McFarland', 'email' => '[email protected]'),
  6.   array('name' => 'Treasure Porth', 'email' => '[email protected]'),
  7.   array('name' => 'Andrew Chalkley', 'email' => '[email protected]')
  8. );
  9. echo "<ul>\n";
  10. //$contacts[0] will return 'Alena Holligan' in our simple array of names.
  11. echo "<li>" . $contacts[0]['name'] ." : " .  $contacts[0]['email'] . "</li>\n";
  12. echo "<li>" . $contacts[1]['name'] ." : " .  $contacts[1]['email'] . "</li>\n";
  13. echo "<li>" . $contacts[2]['name'] ." : " .  $contacts[2]['email'] . "</li>\n";
  14. echo "<li>" . $contacts[3]['name'] ." : " .  $contacts[3]['email'] . "</li>\n";
  15. echo "</ul>\n";
Advertisement
Add Comment
Please, Sign In to add comment