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

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

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

import table with dependency
Hi

What is the best way to import table back which has dependency?

SQL> cre

What are the two different files you download to update kernel?
What are the two different files you download to update kernel?

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

PHP and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

Inserting multiple records from single form
I've found a number of threads that deal with this issue, but I'm new to php and coding language so

Question about GD library
I am trying to make an image that shows a random quote from my database.


However I want t

Number Format
Hi All,

I have number '000000000050085' I want to format it to 500.85 Can any one give me

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