Linked Questions
70 questions linked to/from Convert a PHP object to an associative array
1 vote
0 answers
73 views
PHP - Get data from Soap response
My soap response using SOAP UI <S:Body> <ns2:listIpMemberResponse xmlns:ns2="http://whoisservice.*.com/"> <listResult> <memberInfo> ...
1 vote
3 answers
68 views
Codeigniter data using into controller
In my controller i'm using data variable like this $data['some_var'] = $this->Model->some_info($param); So if i do var_dump this $data['some_var'] it will print like this object(StdClass)[4] ...
-1 votes
2 answers
63 views
Typecast a StdClass object to an array
I have seen the solution to this post: Convert a PHP object to an associative array but it doesn't work for me. I tried several ways to typecast a stdclass object to an array but with no luck. I am ...
0 votes
2 answers
80 views
Sorting simple Object [duplicate]
Base material : I have a base list $food : [{"id":"123","name":"apple"},{"id":"456","name":"Rost Beef"},...] that i ...
0 votes
2 answers
41 views
How to store data in Object to an array in php
againAnotherChild is an object now how can i put the data from it to an array. foreach($anotherChild->children() as $againAnotherChild) //child to //childchildchild { // echo "Inside ...
0 votes
1 answer
43 views
A csv file has a state, county, and data on each line. How can I use PHP associative arrays to convert to states=>counties=>county=>data
My data looks like: countyFIPS,County Name,State,stateFIPS,1/22/20,1/23/20,1/24/20,1/25/20,.... 1001,Autauga County,AL,1,0,0,0,0,0,0,0,0,.... ... I've been able to retrieve it using an Ajax ...
-2 votes
2 answers
38 views
convert stdclassobject into array
i am laraval5.1. i am taking database table into array. data is getting stored into stdclassobject. i want to convert into normal array. how to do that $silver_plans = array(); $...
0 votes
2 answers
37 views
Returning mutliple array from a function in php
I am trying to return the values $jsonTurn2Data ['TurnaroundTime(days)'] and $jsonTurn2Data ['count'] into 2 seperate arrays from the function getTurnATime2ByWeek. Now $jsonDataTurn2Array[] stores ...
0 votes
2 answers
37 views
How do I implement an array from a database?
I want to implement an array from the received data that will contain objects with the same identifiers. pool.query('SELECT * FROM columnslist INNER JOIN tableslist ON columnKey = keyTable', (error, ...
0 votes
0 answers
34 views
How to modify the way an object is casted into an array? [duplicate]
I have to convert an object into an array, but I want to omit some of the objects' properties. class X { protected $a = 1; protected $b = 5; /** * Property 'a' should not exist in the ...