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

Giving the below syntax error
Dear Experts,

I have used 2 buttons in gui status as display and cjhange.When the user wi

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

Database/Table Collation
What is the Database, and table collations used for? i don't understand what there used for since co

how to read and write into a word document using php...?
hi,
I need,reading and writting into a word document using php.




Thank u inadva

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


However I want t

PO Release Strategy Issue
Hi Experts,

I am facing an issue related to PO release strategy. The details are-
<

ORA-01017: invalid username/password; logon denied
Dear All,

I am facing problem in taken backup from db13 it comes up with the following l

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

Trouble with a select list
Hello All!
I was wondering if any of you guys could help me with a small problem I'm having!

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