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

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

Automatically Detect Phone Model for WAP Jar Deployment
Making a wap site is fairly simple, but I'd like to know if there's a way to make it so that the wap

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

Echo Tweaking help!
HI. I would like to have the output of the entered variables repeat forever, but it's stopping at th

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....

I'm scraping a ringtone site

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

Using real time in php
I'm very average at PHP and im looking to introduce time to something on my site.
Its a sports si

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