Say I have a PHP array like this.
array(2) { ["page"]=> string(1) "a" ["subpage"]=> string(4) "gaga" }
I want to pass the contents of this array to a function call, of a function like this:
function doStuff($page, $subpage) {
// Do stuff
}
How could I destructure this array into individual objects to pass to the function? The variables of the function will always be in the same order that the corresponding keys are in the array.