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

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

How to display random record from table?
I have the following code:

Code: <?php
$display_block .= "<input type=

IP Logger for Voting Script
Can anybody help me place an IP logger into my voting script?
I know that maybe it is not as secu

Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w

Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n

Ten Operator Syntax
Hi Guys,

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

WELCOME SCREEN
first of all let me tell you what does my script do,

it´s a very simple query to show a e

How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.

I am working on a application wh

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