Skip to content
Advertisement

PHP Array format with numbers

i have a big trouble with this code, i need format an array to use in different select, i have an array structure same of this:

JavaScript

I have this code for order in groups of the same name, for uses in html select control

JavaScript

i need get values similar like this:

JavaScript

I need this format

But i get this code:

JavaScript

What can i do for create other array inside whith numbers, no names, thank you for your help

Advertisement

Answer

Thanks to kmoser comment i ‘ve the answer whith similar code, if i want numerate my multidimensional array i have to put [] empty.

changing

JavaScript

For:

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