So I have a php var named $output which when done echo json_encode($output) prints like following:
[{
"title": null
}, {
"title": "a b c"
}, {
"title": "d e f"
}, {
"title": "d f g"
}, {
"title": "f g d"
}]
WHICH I BELIEVE IS CORRECT JSON
now I am using that output to load results via ng-init as it has to be on the same page so I use following code:
> <table ng-init="values =<?php echo json_encode($output); ?>">
> <tr ng-repeat="value in values">
> <td>{{value}}</td>
> </tr> </table>
it gives error as follows:
Error: [$parse:ueoe] http://errors.angularjs.org/1.4.9/$parse/ueoe?p0=values%20%3D%5B%7B
<table ng-init="values =[{" title":null},{"title":"a="" b="" c"}]">
and so on its a big array with lot of words in int. USING ABC IN PLACE OF ORIGNAL WORDS