Linked Questions

3 votes
0 answers
180 views

Is there a way to reconstruct a php structure from its var_dumped representation? That is, given something like array(3) { [0] => int(1) [1] => string(1) "2" [2] => array(1) { ...
gog's user avatar
  • 11.4k
1024 votes
32 answers
2.0m views

I'm integrating an API to my website which works with data stored in objects while my code is written using arrays. I'd like a quick-and-dirty function to convert an object to an array.
Haroldo's user avatar
  • 37.5k
6 votes
6 answers
11k views

How can I parse the output of var_dump in PHP to create an array?
omg's user avatar
  • 141k
0 votes
1 answer
1k views

I trying to get data from a webservices using php curl. I get this data var_dump($result) result is string(136) "array(1) { [0]=> object(stdClass)#10 (2) { ["guid"]=> string(23) "...
Fatih's user avatar
  • 245
-1 votes
3 answers
120 views

I've got a problem, if i retrieve a record from a database, it will return as a string. But I don't want that, because it should be an array: var_dump($data) returns string(654) "Array ( [0] => ...
Refilon's user avatar
  • 3,497
0 votes
2 answers
740 views

I have a return string from a 3rd party plugin that looks like a var_dump from an array. I'm trying to parse into a valid associative array. Looking at various examples and doing some tests with the ...
Doug V.'s user avatar
0 votes
2 answers
638 views

Using the Parse PHP API - I am calling a query to return an object from the table which is working great. Upon var_dump($parseobjecthere) I receive a nice hierarchical output of the object which I'd ...
Sean Leach's user avatar
0 votes
1 answer
493 views

Within the wp_posts WordPress table, I have a row stored for a post (custom post type) that literally stores the following within the post_content column: Array ( [test_price] => 39.00 [...
David Wilkinson's user avatar
-2 votes
1 answer
467 views

I'm looking to store some basic information (just simple variables, not a database) which doesn't require any security (simple strings stored for case sensitivity, lets me skip a MySQL query to ...
John's user avatar
  • 1
0 votes
1 answer
181 views

I'm looping through a database table which holds some data related to external API responses. Someone was saving the responses as text, like so: object(stdClass)#5 (1) { ["CreateProspectResult"]=&...
coffeemonitor's user avatar
-5 votes
4 answers
184 views

Im not sure what I am doing wrong here. I have a txt file that stores and array: Array ( [0] => Array ( [sku] => 123123 ) ) When I go ...
LargeTuna's user avatar
  • 2,844
0 votes
1 answer
105 views

Say you have a method that receives an array as a parameter. That method does some manipulation with that array and then outputs a different array. public function createArrayForX(array $myArray){ ...
Claudiu Creanga's user avatar
1 vote
3 answers
81 views

I have a string stored on my database in the following format: $str = '[0=>"hello",1=>"world"]'; I wish to convert this into an array which would have the 0,"hello" key-value pair, 1,"world" ...
user3502651's user avatar
-1 votes
1 answer
83 views

haven't touched PHP in ages and am a bit rusty. I need some guidance in where to go from here. I've got two arrays that I want to compare and find the difference however I can't compare the two as ...
Elliot's user avatar
  • 1,014
0 votes
1 answer
35 views

My error log has sent me an email which includes a big array of data, which was stored in the users session. This array SHOULD have been converted to a JSON encoded string and stored in my database ...
James Wilson's user avatar

15 30 50 per page