There is a php code

$myArray = array(); $strSQL = "SELECT * FROM mydb.rooms"; $rs =$conn->query($strSQL); while($row = $rs->fetch_array(MYSQLI_ASSOC)) { $MyArray[] = $row; } echo( json_encode(['records'=>($MyArray)])); 

There is controller.js

 .factory('playlistService',function($http) { var playlists = [{idr:1, namer:"Standart"}]; return { playlists:playlists } }); 

How to add data from php to playlists

Closed due to the fact that the issue is too general for participants Dmitriy Simushev , user194374, Alex , Denis Bubnov , Denis 9 Dec '16 at 6:42 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    Ajax "ask" for pkhp result. Or display the result on the page in the tags in some, and zhskoy cycle run on them. - user190134
  • How to implement an Ajax? Only I delve. Could you tell me what to write and where? - paulsud

0