Php Reset Array After Foreach Javascript Mdn Dom Js Pdf