You should definitely look into using json to communicate code between php and js. However, I don't know what you want to use this code for, so this is does what you want (as a general rule, you don't want to use that):
<?php
$str = 'var Array = [
{"a": "val1", "b": 1},
{"a": "val2", "b": 2}
];';
$matches = array();
preg_match("/^(var\s+)*([A-Za-z0-9_\.]+)\s*=\s*([^;]+);$/", $str, $matches);
print "<pre>";
var_dump($matches);
print "</pre>";
$array = json_decode($matches[3], true);
print "<pre>";
var_dump($array);
print "</pre>";
?>
Also note that I had to replace the single quotes with double quotes for this to work, I have no idea why I had to do that.
If you say why you need this, you might get a little more help.