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

please fix the error
What is the error in the below code ???
Line number On/Off | Expand/Contract <?php

Warning: session_start() headers already sent error - Driving me Nuts!
I am trying my sister in laws site and I keep getting an error with my coding. I am more of a design

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

while($num > 0)

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

extract data
Code: <div class="post hentry uncustomized-post-template">

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php


Thanks in advance

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