I was looking for hi and low for a solution. I have a dynamic multidimensional array that I need to split and urlencode. The number of elements will change, but they will always have the same keys.
$formFields = Array (
[0] => Array ( [form_name] => productID [form_value] => 13 )
[1] => Array ( [form_name] => campaign [form_value] => email@gmail.com )
[2] => Array ( [form_name] => redirect [form_value] => http:
Each array has a form name and a form value.
This is what I'm trying to get to:
$desired_results =
productID => 13
campaign => email@gmail.com
redirect => http://example.com
Every time I try to break them, I get: form_name => productID or something like that.
I try to accept the results and then urlencode them:
productID=13&campaign=email&gmail.com&redirect=http://example.com&
source
share