title: Error in setting an associative array
body: <p>I am trying to display the animal and the average lifespan in years, it won't show the lifepsan. Any help?</p>
  
  <pre><code>&lt;?php
  $animal = $_POST['animal'];
  
  array(
  $lifespans["Mouse"] =&gt; "4",
  $lifespans["Queen Bee"] =&gt; "5",
  $lifespans["Squirrel"] =&gt; "20",
  $lifespans["Rattlesnake"] =&gt; "22",
  $lifespans["Pheasant"] =&gt; "27",
  $lifespans["Mallard Duck"] =&gt; "29",
  $lifespans["Bear"] =&gt; "40",
  $lifespans["Box Turtle"] =&gt; "123",
  );
  
  print("&lt;p&gt;The $animal has an average life space of $lifespans years.&lt;/p&gt;");
  </code></pre>
  
  <p>?></p>
  
  <p>EDIT:</p>
  
  <p>The user has a drop down menu of those animals and when they choose one and hit submit it will show their lifespan. </p>