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

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Find current logon time
Hi,
in my sql script i want to query and find out the logon time of the current session.
<

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Getting Subdomain Name With PHP?
I want to grab the subdomain name with PHP so I can generate database queries.

for example my

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

Take info from one coloum and move to another
Hi all,

I have this:
Code: [Select]$array = "SELECT stock_id FROM stocks WHERE stock_

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

Multidimensional Array into an Html table, help!
Hello all, I am new to HTML/PHP so any help would be great.

I have a multidimensional array f

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