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

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

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

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

Question about ShowWindow()
Hello....

I'm struggling with sumpin, and I hope y'all can help.

I've got a CFormView

FAGL_FC_TRANSLATION FAS52 New GL ECC 6.0
Hello,

The new program for Translating GL Balances (FAS 52) gives the option to use diffe

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