My PHP file is storing input in the form of an array from HTML checkbox. I need to pass this array to a python file. There are few answers already that discuss it here and here
They all involve use of JSON as it can serialize data.
However I wanted to know if there is some other way to achieve it,
for example where I can pass it like integer or string variables like:$output=shell_exec("python.py $var1 $var2 $arr1);
If I directly pass the array as above. The data sent is literally Array
.
So any way to achieve this.
For python , I am reading all arguments as :arg=sys.argv()
var1 = arg[1]
var2=arg[2]