title: Object Oriented PHP Array - Create "locations" list from OO PHP data
body: <p>I'm using FedEx's API to find "dropoff" locations for their stores that I then will be displaying using a map API (Google).</p>
  
  <p>The API is working however I am having trouble as I am unfamiliar with the Object Oriented array.</p>
  
  <p>I'd like to store values in the array as unique variables so I can pass them to my map API.</p>
  
  <p>I'm trying to accomplish something LIKE the below:</p>
  
  <pre><code>&lt;?php
  
  // MY "IDEAL" solution - any other ideas welcome
  // (yes, reading up on Object Oriented PHP is on the to-do list...)
  
  $response = $client -&gt;fedExLocator($request);
  
  if ($response -&gt; HighestSeverity != 'FAILURE' &amp;&amp; $response -&gt; HighestSeverity != 'ERROR')
  {
      $response -&gt; BusinessAddress -&gt; StreetLines[0] = $location_0;
      $response -&gt; BusinessAddress -&gt; StreetLines[1] = $location_1;
      $response -&gt; BusinessAddress -&gt; StreetLines[2] = $location_2;
  }
  
  ?&gt;
  </code></pre>
  
  <p>Working FedEx Code Sample:</p>
  
  <pre><code>&lt;?php
  
  $response = $client -&gt;fedExLocator($request);
  
  if ($response -&gt; HighestSeverity != 'FAILURE' &amp;&amp; $response -&gt; HighestSeverity != 'ERROR')
  {
      echo 'Dropoff Locations&lt;br&gt;';
      echo '&lt;table border="1"&gt;&lt;tr&gt;&lt;td&gt;Streetline&lt;/td&gt;&lt;td&gt;City&lt;/td&gt;&lt;td&gt;State&lt;/td&gt;&lt;td&gt;Postal Code&lt;/td&gt;&lt;td&gt;Distance&lt;/td&gt;&lt;/tr&gt;';
      foreach ($response -&gt; DropoffLocations as $location)
      {
          if(is_array($response -&gt; DropoffLocations))
          {
              echo '&lt;tr&gt;';
              echo '&lt;td&gt;'.$location -&gt; BusinessAddress -&gt; StreetLines. '&lt;/td&gt;';
              echo '&lt;td&gt;'.$location -&gt; BusinessAddress -&gt; PostalCode. '&lt;/td&gt;';
              echo '&lt;/tr&gt;';
          }
          else
          {
              echo $location . Newline;
          }
      }
      echo '&lt;/table&gt;';
  }
  
  ?&gt;
  </code></pre>