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

Why is my row count 0?
Here's the MySQL query i'm running. It basically pulls data from 2 tables based on some data passed.

Array help
Hello i got this code to fetch data from database but it is not working it displays
7
Array

Open link with largest int string first
I have the following links i would like to open either all at once or one-by-one. How would i procee

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

Is it possible to stop reservation creation in PM Order?
Hi All,

Is it possible to stop reservation creation in PM Order?

Thanks in adv

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

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