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

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

checkbox update
I am having a brain fart right now and i cant remember how to do this. if anyone could help that wou

Trouble verifying database password
Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried). <

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

an interesting question
Greetings folks, got to ask an interesting question...

let say
i have created a function s

IDOC error
Hi, When i send IDOC from ECC system to MII there is no problem ECC side, i says message sent succe

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