Skip to content
Advertisement

save Smarty values dynamically in Multidimensional JavaScript array

I fetched data from the db and saved it in a smarty array. Now I want to save those values in a javascript array and i dont know the size of it.

JavaScript

The array is only saving one value for the longitude and one for the latitude despite that i have more than one value for each one. Im sure i need to loop it, but as i said i dont know the size of what i should loop because the $car_owner array contains data fetched from the db. An help would be appreciated. Regards

Advertisement

Answer

You can do this with two loops.

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