0
I wanted to get the maximum and minimum of an Array. The Array comes in PHP and I use Json to convert to Javascript. I used the Math.max.apply(null, js_array)
but it doesn’t work for me.
//convert php array to javascript
var js_array = [<?php echo '"'.implode('","', $array_nombre).'"' ?>];
Also put the code that goes next to the client. Already after PHP.
– Sergio
The code that comes after PHP, is the one that is in the question.
– akm
The values are well inserted, what is done is converted the php array to the javascript string
– akm
This makes no sense. The code after PHP no longer has PHP. How does this array look in the HTML page if you see the source code?
– Sergio
I don’t see JSON involved in array conversion...
– Sergio