Questions:
How to generate empty lines in PHP using the Echo method to output long strings to a Web page?
Dutylist[2]=[new Array ("Teaching director", "9"), new Array ("deputy director of Teaching", "ten"), New Array ("Class teacher", "one"), new Array ("Academic", "12")];
Dutylist[3]=[new Array ("Admissions office Director", "1"), new Array ("Associate director of Admissions Office", "2"), new Array ("Consultant", "3"), new Array ("Network advisory
Consultant "," 4 "), New Array (" Consulting assistant "," 5 "), new Array (" Media Specialist "," 6 "), new Array (" Brand communications Specialist "," 7 "), new Array (" Regional supervisor "," 8 ")];
As shown in the above code, I use PHP dynamic generation of JS code, short string Output no problem, long string dutylist[3] output to the page produced a blank line caused JS can not run, please the Colonel Advice Ah!
Answer:
Not the echo question, you have a line break in your PHP code itself.
The new Array ("Network Advisory
Consultant "," 4 "),
Here itself there is a newline character inside. I normally use echo to output the entire page without any extra blank lines.
http://www.bkjia.com/PHPjc/364592.html www.bkjia.com true http://www.bkjia.com/PHPjc/364592.html techarticle question: How to generate blank lines in PHP using the Echo method to output long strings to a Web page What do you do? Dutylist[2]=[new Array (teaching Director, 9), new Array (Deputy director of Education, Ten), new Array (head teacher, one), new ...