A difficult way of writing, the veteran also needs to be timid about the problem of single quotes in double quotes
Prepare to write in the following format
Script
$ Morpic. = "nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = "";";
?>
Script
The red part is intended to be written. of course it is wrong. I just threw it into double quotation marks. the single quotation marks and double quotation marks are not processed yet,
So how to deal with it? I tried to escape it.
The content in double quotation marks is
Nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = "";
Reply to discussion (solution)
$morpic .='nnd=nnd'+'';
You can use the delimiters.
$ Morpic = '';
$ Text = < Nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = "";
EOD;
$ Morpic. = $ text;
$ Morpic. = "[color = #008000] nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = ""; "; [/color]
You can use the delimiters.
$ Morpic = '';
$ Text = < Nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = "";
EOD;
$ Morpic. = $ text;
I wrote as you said, but I still prompted an error. Is it wrong,
Below is what I wrote
$ Morpic. = "< Nnd = nnd +''
Img1 = new Image ();
Img1.src = "/UploadFiles/20121116135815925.jpg ";
Url1 = new Image ();
Url1.src = "";
EOD ;"
}
Echo $ morpic;
Another problem
How do I write variables in delimiters?
$ Text = < Nnd = nnd +''
Img1 = new Image ();
Img1.src = "'. $ smallpic .'";
Url1 = new Image ();
Url1.src = "";
EOD;
Why can't I write this?