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

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

Writting a script to arrange images........ need some help
Ok so here is the link

http://hmtotc.com/dev/projects/vrassociates/jeweler_dev/admin/index.ph

Load file in PHP
I have 2 files. The first is a PHP generated XML file that's dependent by 2 inputs. The second is a

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

php redirecting
i wont open a new thread but i have a question about redirecting....
i wonder why my code doesnt

Converting RGB values to HEX
Code: <?PHP

$file_handle = fopen("colors/rgb.csv", "r");

wh

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t

first id from db not showing
I have a php script which displays the content of a mysql table as a html table with sorting, delete

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

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