Let's say I have a php array like this:
$compare = array("Testing", "Bar");
$my_array = array(
"Foo=7654", "Bar=4.4829", "Testing=123"
);
So it's safe to say below:
$compare[0] = "Testing"
So I wanna check if $my_array contains $compare[0] (in above case, yes it does) And if it contains returns that value from $my_array which is Testing=123
How's that possible?
$my_array = ['Foo' => '7654', 'Bar' => '4.4829', 'Testing' => '123'];because it would make finding the result very easy:echo $my_array['Testing'];parse_str(implode('&',$my_array),$better_array);This might not work if the API puts weird things in the array, so be careful.