Php Array Functions Vs Foreach Js Example