Note that there are some explanatory texts on larger screens.

plurals
  1. POAmbiguity in PHP array
    primarykey
    data
    text
    <p>I want to display the Itinerary details from developer.ean.com API. By passing the customer's Itinerary ID and Email ID I got the details of reservation. The result is comming in json format so I decoded it and creating array by using :</p> <pre><code>$array=json_decode($result); </code></pre> <p>The problem is whatever the result comming from API contain problem like : </p> <p>For some records it providing array like this:</p> <pre><code>[Itinerary] =&gt; stdClass Object ( [HotelConfirmation] =&gt; Array ( [0] =&gt; stdClass Object ( [supplierId] =&gt; 13 [chainCode] =&gt; EP [arrivalDate] =&gt; 07/24/2012 [departureDate] =&gt; 07/26/2012 ) [Hotel] =&gt; Array ( [0] =&gt; stdClass Object ( [hotelId] =&gt; 394808 [statusCode] =&gt; A [name] =&gt; Barkston Youth Hostel ) ) ) ) </code></pre> <p><strong>In this case the HotelConfirmation and Hotel is Array which contain [0] as object</strong></p> <p>and for some records it providing array like this:</p> <pre><code>[Itinerary] =&gt; stdClass Object ( [HotelConfirmation] =&gt; stdClass Object ( [supplierId] =&gt; 13 [chainCode] =&gt; EP [arrivalDate] =&gt; 07/24/2012 [departureDate] =&gt; 07/26/2012 ) [Hotel] =&gt; stdClass Object ( [hotelId] =&gt; 394808 [statusCode] =&gt; A [name] =&gt; Barkston Youth Hostel ) ) </code></pre> <p><strong>and In this case the HotelConfirmation and Hotel is itself an object</strong></p> <p>I providing only few data here actually its big array and I want to provide list of it. But the array containing ambiguity like this. How can I handle this issue. Is there any solution. </p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload