[TotalPed] => Array
(
[VlrTotalIPI] => 0.00
[VlrTotalItens] => 652.68
[VlrTotalDesc] => 0.00
[VlrTotalPed] => 652.68
[PercComPed] => 0.00
[PercComPed2] => 0.00
[VlrFrete] => 0.00
[TotalBaseIcms] => 0.00
[VlrTotalIcms] => 0.00
[VlrTotalBaseIcmST] => 0.00
[VlrTotalIcmST] => 0.00
[vFCPUFDestTot] => 0.00
[vICMSUFDestTot] => 0.00
[vICMSUFRemetTot] => 0.00
)
I have this array in a $ myArray variable. I would like to know how to check if the fields exist (keys).
Example: [VlrTotalIPI]
if there is no need to say that you need this field ( I believe you have to compare with an array where only the required fields are ).
And also if there are values for these keys, again if it does not exist, point to the key that needs value. Using clear function, to do this independent of the Array.