how to get javascxript array to php for values code example Example: php array to js var arrNums = json_encode(<?php echo $arrNums; ?>);