I have an array:
$TaxIds=array(2) { [0]=> string(1) "5" [1]=> string(2) "10" }
I need convert to this:
$TaxIds=array(2) { [0]=> int(5) [1]=> int(10) }
simple way???
Simplified version of @george's answer would be:
$TaxIds = array_map('intval', $TaxIds);
More info at array_map
Although the question was asked a long time ago, it may be useful for someone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With