php - how to get correct data from this array? -


This answer may seem simple but I am new to PHP and to spend so much time trying to figure out Ho.

My array looks like this:

  $ phone_number [] = array ("type" => gt; "home", "value" => Customer_phone);  

And I also have it:

  $ client = array ("first_name" => $ first_name, "phone_numbers" => $ Phone_number, "email" = & gt; $ email,  

I want to retrieve the numbers for each customer. I have tried to:

 value );}  

But it gives me an error. It says that I am trying to get non-object property, and then it Whenever I use it:

  var_dump ($ customer_entries [$ J] -> phone_number;  

This gives me something like this:

  array (1) {[0] = & gt; Object (StdClass) # 744 (2) {["type"] = & Gt; String (4) "Home" ["value"] = & gt; string (14) "(555) 555-5555"}}  

How do I get the result of a string named "value"?

Thank you.

  $ customer_entries [$ j] ['phone_numbers'] ['value'] < / Code> 

Use it as a array array, not an object.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -