split values


Posted on 16th Feb 2014 07:03 pm by admin

I have values that are returned to me in this format:

name=>test,age=>49

Did you know?Explore Trending and Topic pages for more stories like this.
What I want to get out of this is an array like this

array('name'=>'test','age'=>'49');

I was hoping some one could let me know the best way to do this. I was thinking about using preg_split() but wasnt sure if it was the best method. Also not that good with regex. Any help is appreciated.
No comments posted yet

Your Answer:

Login to answer
330 Like 6 Dislike
Previous forums Next forums
Other forums

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

Libraries in C++
Hi all,

I have two libraries. one is based targeted on linux platform and uses another li

user data not transferring to new page
I'm a PHP learner. After an index.php page, the user goes to a login.php page. Both pages seem to

help need on ob_start()
Hi

I am a newbie in php, I have a code
Line number On/Off | Expand/Contract <?phpo

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Problems with strings containing
Hey all,

I have encountered something strange in a script. I am trying to write an XML heade

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash