Js Array Methods Foreach Php Key Value