return array of int from php to javascript code example Example: php array to js var arrNums = json_encode(<?php echo $arrNums; ?>);