Home >Backend Development >PHP Tutorial >Heredoc structural form in PHP
In PHP, if the string is very long, you can use the Heredoc structure method to solve the problem. First, use delimiters to represent the string (
<?php $string1 = <<<GOD 我有一只小毛驴,我从来也不骑。 有一天我心血来潮,骑着去赶集。 我手里拿着小皮鞭,我心里正得意。 不知怎么哗啦啦啦啦,我摔了一身泥. GOD; echo $string1; ?>
The above introduces the Heredoc structure form in PHP, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.