Maison >développement back-end >tutoriel php >PHP定界符 多行字符串的生成
<code>$符) (开头无空格)第一行 <span>XXX</span><span>XXX</span><span>XX</span>(开头无空格)变量(无<span>$符</span>)</code>
<code><span><span><?php </span><span>$s</span> =<span>1 <p>2</p> <p>3</p> s;</span><span>echo</span><span>$s</span>; <span>?></span></span></span></code>
<code>1 2 3</code>
实例2:
<code><span><?php </span><span>$_data</span> =<span> <note> <to>George</to> <from>老三</from> <heading>Reminder</heading> Don't forget the meeting! </note> data;</span><span>$myfile</span> = fopen(<span>"file.txt"</span>, <span>"w"</span>) <span>or</span><span>die</span>(<span>"Unable to open file!"</span>); fwrite(<span>$myfile</span>, <span>$_data</span>); fclose(<span>$myfile</span>); <span>?></span></span></code>
<code>file.txt内容: <span><?xml version="1.0" encoding="UTF-8"?></span><span>note</span>><span>to</span>>George<span><span>to</span>></span><span>from</span>>老三<span><span>from</span>></span><span>heading</span>>Reminder<span><span>heading</span>></span><span>body</span>>Don't forget the meeting!<span><span>body</span>></span><span><span>note</span>></span></code>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介绍了 PHP定界符 多行字符串的生成,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。