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

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

PHP & Java
Hello,

can PHP code be used inside java code?

Code: <SCRIPT LANGUAGE="Java

GET * FROM _____ Except?
I have a site that is for stock photography.

This section of the code calls images to display

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Transaction variant for VA02 not working
My requirement is to have transaction for user to only add the output and print a sales order.

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

Wrong Info sent Using $get in form
Hi i have this code that i tried to make to send some info from one page to aother with lots of ppls

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

PHP login form help (Done Most of It)
Hi i am having a problem, when i try logging in it is always saying "Invalid Login" im not

pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that

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