I am very new to PHP. I wanted to call restful api in PHP. I am doing same in jQuery as below
var url;
url = "https://www.example.com/_api/lists/getbytitle('Stations')/items?$select=CityCode,CityNameEN&$filter=Active eq 'Yes'&$orderby=CityNameEN";
$.ajax({
url: url,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
async: false,
success: function (data) {
$.each(data.d.results, function (i, item) {
});
}
});
How can I do same in PHP. I have two difficulties. First in URL there is $ sign which PHP assume as variable and other I don't know how to do that