Php For Loop Array Size In Javascript How To Convert