How to get value from subarray of this array

Hi,
I’ve an array below which I’d like to retrieve each individual values.


Array(
	[employee] => id=55&name=John&last_name=Smith,
	[salary] => 40000,
	[bonus] => 5000
);

I want to extract the first set of data to


	$id = "55";
	$name = "John";
	$last_name = "Smith";

How do I do this?
Thank you,

Hi ketting00,

There’s a php function called [fphp]parse_str[/fphp] which can solve this for you:


$array = array(
	'employee' => 'id=55&name=John&last_name=Smith',
	'salary' => 40000,
	'bonus' => 5000
);

parse_str($array['employee'], $employee);

$employee is now an array of the values from the employee string.

Thank you,

That helps me a lot.