1, for PHP file, the introduction of variables in double quotation marks requires adding { Variable name } ;
. variable name or . Variable name . ;
$a = "gegweg{$demo};
$a = "Gegweg". $demo;
$a = "Gegweg". $demo." Fweffwef ";
2, for The JS file, the introduction of variables to add the + number,
Var demo;
Alert ("GEGWG" +demo); for JSON format, you only need to add the variable name after the key value:
3, Vardemo= "Nike";
var txt = ' {' Employees ': [' +
' {' firstName ': ' Bill ', ' lastName ':demo}, ' +
' {' firstName ': ' George ', ' LastName ':}, ' +
' {' firstName ': ' Thomas ', ' lastName ': ' Carter '}]} ';
4, for the front has double quotation marks, can be solved by the plus sign:
var random = Math.ceil (Math.random () *10000000);
alert (random);
var data = ' {' msg ': {"head": {"random": "' +random+ '"}, "Body": [{"type": 0, "content": {"text": "Hello, what can I do for you"}}]} ';
The above describes the PHP and Js,json file format of the reference summary of the variables, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.