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.

330 Like 6 Dislike
Previous php-forum Next php-forum
Other php-forum

PHP If Else statement for breadcrumb
Hi

I am trying to use a PHP if else statement to display a breadcrumb link on wordpress

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

phph within href not showing php if change ? to &
Code: [Select]<a href="<?php echo $puser; ?>?m=<?php=(($m-1)&l

Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be

limit string by words??
hello all,

I was wonder if there is a function to limit a string by the number of words inste

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