lundi 18 juillet 2016

Concatenation of php variable with javascript


var settings = {
  "async": true,
  "crossDomain": true,
  "url": 'https://example.com/something.aspx?i='<? echo urlencode($_GET['id']); ?>,
  "method": "GET",
  "headers": {
    "cache-control": "no-cache",
  }
}

It doesn't work this way, the concatenation is wrong I think. Tried few ways still doesn't work.


Aucun commentaire:

Enregistrer un commentaire