Hello I\'m trying to pass several arrays from php to javascript. For some of them it works, for others not. I get an array of filenames and an array which contains the content o
The problem is already solved for you. Use json_encode instead.
json_encode
print('filesArray = '.json_encode($filesArray));
Note that json_encode demands that your data is utf8 encoded. But you should do that already anyway.