Php Find If Array Contains Javascript Mdn For Loop