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

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

Help to integrate whois Domain Details to website
Hi,

can i know is their any php script r methods to add domain details to my website.

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

php calculate
this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNum

php include email form with attachment
I have had no luck with finding a email form all over the Internet for various reasons. Some insecur

Something like an INI editor or a DelimitedText-Editor
Hi all,

Am very, very, very new to PHP and not sure if I should be posting this to a Javascri

Am i doing this wrong?
Im pulling from an Oracle database some info... one of which is a field count_pnums which is a NUMBE

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

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