You could try using PHP to create a javascript array, which would then be accessible from inside the javascript function. i.e. if you have your PHP array called '$arrayname', try something like:
<script language="javascript">
<?
if (is_array($arrayname))
{
echo " arrayName = new Array(\"".implode('","',$arrayname)."\");\n";
}
else
{
echo " arrayName = new Array();\n";
}
etc... (i.e. javascript function)
You should then be able to use the 'arrayName' variable inside your javascript function. The checking for an array above is so that if the php array is empty, you should still declare an empty array in javascript, to avoid nasty errors...