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

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

C problem struct and string
Hi guys,

This is my first post and I'm hoping the experts here can help me solve my problem.<

need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code.

Reditecting pages based on logic
Newbie here, apologies in advance!

I am trying to use the header function to forward one of a

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

Retail terminologys not been altered after activing Retail System
Hi, All

After I active Retail System via TCode SWF5, the terms does not been changed, th

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Unable to customise toolbar in FCK
Am I setting up my sites oldschool?
Ok,

When I create a site I open a basic template that I have created that consists of a css f

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