0

Find ID value through php

stdClass Object ( [Providers] => Array ( 
            [0] => stdClass Object ( 
                [Main_Fax] => 
                [Signed_POA] => No 
                [Signed_HIPAA] => No 
                [Website] => www.google.com 
                [VAR_Provider_Type] => Template Test 
                [State_Temp] => 
                [City] => 
                [Notes] => 
                [Main_Phone] => 
                [ZIP] => 
                [Provider_Type_Temp] => 
                [State] => Alaska 
                [Signed_Purchae_Agreement] => No 
                [Reimbursement_Rate] => 0 
                [ID] => 977948000009029003 
                [Provider_Name] => Amit 
                [Address_Line_1] => 
                [In_Network] => No 
                [Address_Line_2] => 
            ) 
        ) 
    )

Seprate this json & show id value through php -> means this value [ID] => 977948000009029003

Murad Hasan
  • 9,565
  • 2
  • 21
  • 42
Amit Kanala
  • 123
  • 1
  • 1
  • 12

2 Answers2

3

Let your array is $arr.

Now try this:

$arr->Providers[0]->ID;

Result:

977948000009029003

Murad Hasan
  • 9,565
  • 2
  • 21
  • 42
2
$data->Providers[0]->ID

See the structure of the object you gave us. You can see there's an object with a item called Providers. You can then see that the value of "Providers" is an array indexed by a integer, which inside it has an Object. The object contains the ID you wish to obtain.

Object > Array > Object

megubyte
  • 1,549
  • 9
  • 15