Convert Php Variable To Javascript Array Functions