I can’t seem to get php to accept dynamic values for parameters when I have a default specified. I’ve read here that the default value needs to be at the end of the function, which I’ve done.
$isbilling = true;
function retrieve_address($dbh, $customer_id, $isbilling=false){
echo $isbilling; //false
}
What am I doing wrong here?
You have set the default value for $isbilling to false, and you aren’t passing anything to the $isbilling parameter when you call it (I’m assuming, since you didn’t actually post that part).
Try this: