PHP PHP Arrays and Control Structures PHP Arrays Multidimensional Arrays

Megan Stachnick
Megan Stachnick
1,806 Points

I got to this point but now it's saying to check my spacing?

I got to this point but now it's saying to check my spacing?

index.php
<?php

$contacts = array(
  array(
  'name'=>'Alena Holligan',
  'email'=>'alena.holligan@teamtreehouse.com'),
  array(
  'name'=>'Dave McFarland',
  'email'=>'dave.mcfarland@teamtreehouse.com'),
  array(
  'name'=>'Treasure Porth',
  'email'=>'treasure.porth@teamtreehouse.com'),
  array(
  'name'=>'Andrew Chalkley',
  'email'=>'andrew.chalkley@teamtreehouse.com'));

echo "<ul>\n" . 
"<li>" . $contacts[0]['name'] . ":" . $contacts[0]['email'] . "</li>\n" . 
"<li>" . $contacts[1]['name'] . ":" . $contacts[1]['email'] . "</li>\n" . 
"<li>" . $contacts[2]['name'] . ":" . $contacts[2]['email'] . "</li>\n" . 
"<li>" . $contacts[3]['name'] . ":" . $contacts[3]['email'] . "</li>\n" .
"</ul>\n";

1 Answer

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,287 Points

Just a small fix: There should be a space on both sides of the colon for each list item. " : " instead of ":".