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

Batch Related Pricing
Hi, I need some clarity on the batch related pricing

For example the following are the b

Reading waves
Hi,

I am trying to find a way of finding the highs and lows on a graph line, the line points

mysql UPDATE request not working and driving me crazy!!!
Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database

Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

PHP4 to PHP5 Conversion
Hi Everyone,

I am working on a site that is built up on PHP4 and each page is being started f

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

$variable = $variable
Hello

Sorry if this is a really simple question but I have run out of ideas. Is there a reall

SQL Query/echo not working
Hey all,

I'm trying to run (what I thought) was a simple operation and it isn't working. I h

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