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

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

Somebody hacked into my site and changed coding >>> URGENT HELP NEEDED <<<
I am not that much into programming , but somebody is hacking to my site and injecting some kind of

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

Need help with a mail notify function
I was tasked with setting up a site that's been prewritten. The site is basically a form that captur

PHP5 - Verifying a secure mail is secure
I need to send an e-mail from a form to a external department and because it contains personal custo

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