Suppose that I have a string $var:
//php code
$var = "hello,world,test";
$exp = explode(",",$var);
Now I get the array as exp[0],exp[1],exp[1] as 'hello', 'world' and 'test', respectively.
I want to use this all value in javascript in this:
var name = ['hello','world','test'];
How can I generate that JavaScript in PHP?