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

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

---

(Why? I am creating an web app and

Easy administration on MySQL databases
My website is database driven and I am very tired of manually making queries to my tables in order t

Table Control
Hi Guru's,

I've created a Module pool program, which contains the Table Control.

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

session variables not working anymore
hello,
i use sessions to handle authentication within my site. my host has been changing a lot of

Confusing Functions
So, I've been reading up on Functions and I like them! However, I need some help using variables in

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

Time script, set to my time zone?
I am using this line to get the date and time

Code: $time = date(F." ".d.", &q

WORDPRESS - Multiple Loops Only Going to One Post?
I have various pages with multiple loops and i need them to be individual to all other categories.

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