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

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

FPDF Help
I've been playing with the FPDF module. I was building a form and rolling right along and then sudde

PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.

If i send the value by this

UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C

need a script for 3 pages
I have a customer who wants me to set up a site with a number of pages with the following requiremen

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