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

Preg_match question
I want to use preg_match to make sure a string is always 6 characters long and only contains 0-9 and

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

Functions Not Loading Into Div
I had some help doing some of this but what I'm trying to do is get my functions to retrieve its val

database design
Hi,

I got a page which allow candidate to type in their previous working experience,
I let

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

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