Skip to content
Advertisement

PHP Multidimensional array number formatting returns A

I am having issue with number formatting of array elements. It always returns an “A” letter, no matter element value.

JavaScript

I am calling for that value with adress $tab['VII']['B']['podatek']['PTUG'] An this is part of an Array:

JavaScript

I am using tcpdf with this file as well, if that is making a trouble. What i need is to in proper fields call out for specific array elements and conver them to: 123 123,45 number format.

Also, would need to format date from yyyy-mm-dd to dd-mm-yyyy with addition of “r.” after the date.

Advertisement

Answer

You can use array_walk_recursive() to run through your array. Within the callback, add your different checks to modify the values in each case.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement