Php For Each Item In Array Javascript Length Of Associative Array