I want to pass a PHP array as URL parameter in GET method . Here is my php array : Array ( [0] => 4 [1] => 5 )
1st I convert it to angularJs array like this
$scope.myData.excludeList = '<?php echo JSON_encode($savedList);?>';
Then I pass this array like this :
$scope.myData = {};
$scope.myData.array =[];
var response = $http({
url: 'http://localhost/control/file_list/',
method: "GET",
params: $scope.myData.array
});
response.success(function (data){
$scope.list = data.list;
});
But when it hit the URL look like
http://localhost/control/file_list/%5%%22 lab lab lab.... how can I solve this ?