I have this data structure below, which is a print_r of $_GET:
Array (
[url] => search/
[q] => shirt
[view_all] =>
[price_float_GBP] => Array
(
[0] => 107
)
)
Why does $_GET['price_float_GBP'][0] work but current($_GET['price_float_GBP']) doesn’t?
Sorry if this is a newbie question but I don’t quite see it.
According to the manual it’s possible the pointer to be beyond the end of the elements list. This can easily happen if you use foreach on that array.
Cheers.