Javascript Determine If Array Php Example