Php outputs html code. at the end of this post, wealsh will edit the & nbsp; html & nbsp; code (converted) in the database from 2014-03-2617: 58: 36: & lt; p & nbsp; & gt; & lt; br & nbs php output html code
This post was last edited by wealsh at 17:58:36
Html code in the database (converted ):
50 years ago, General Charles de-Charles pushed the two great countries in China and France to shake hands with remarkable strategic vision and extraordinary political courage, it has set up a model for peaceful coexistence and win-win cooperation among countries with different social systems for the international community, and has a significant and far-reaching impact on the international strategic landscape.
Confucius said: "Fifty Days and destiny ." The 50-year development history of Sino-French relations has inspired both sides to maintain special friendship and make a good and win-win situation. Both parties believe that mutual respect and mutual trust and honest treatment are essential for maintaining healthy and stable development of Sino-French relations. Dare to advance and keep pace with the times is an important magic weapon for Sino-French relations to always be at the forefront of China's relations with Western countries. Mutual benefit and mutual benefit are the fundamental starting points for Sino-French relations to benefit the people of both countries for a long time. Independence and consistency while reserving differences are the spiritual basis for Sino-French coordination and cooperation in international affairs. Working together and facing the world is China and France's unremitting pursuit of peace and development in the changing world.
In php, how do I add document. writeln to each row? For example:
$ Html = 'document. writeln ("
");
Ocument. writeln ("
");
';
------ Solution --------------------
$ Html = <
50 years ago, General Charles de-Charles pushed the two great countries in China and France to shake hands with remarkable strategic vision and extraordinary political courage, it has set up a model for peaceful coexistence and win-win cooperation among countries with different social systems for the international community, and has a significant and far-reaching impact on the international strategic landscape.
Confucius said: "Fifty Days and destiny ." The 50-year development history of Sino-French relations has inspired both sides to maintain special friendship and make a good and win-win situation. Both parties believe that mutual respect and mutual trust and honest treatment are essential for maintaining healthy and stable development of Sino-French relations. Dare to advance and keep pace with the times is an important magic weapon for Sino-French relations to always be at the forefront of China's relations with Western countries. Mutual benefit and mutual benefit are the fundamental starting points for Sino-French relations to benefit the people of both countries for a long time. Independence and consistency while reserving differences are the spiritual basis for Sino-French coordination and cooperation in international affairs. Working together and facing the world is China and France's unremitting pursuit of peace and development in the changing world.
Html;
$ Out = '';
$ Exp = explode (PHP_EOL, $ html );
Foreach ($ exp as $ value ){
$ Out. = "document. writeln (". $ value. ");". PHP_EOL;
}
Var_dump ($ out );
------ Solution --------------------
Why?
Isn't it easier to add a line break?