Code accross multiple lines (PHP)

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 11 aug 2019 om 12:32
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Naar navigatie springen Naar zoeken springen

Ja dus. En je hebt er geen speciale tekens voor nodig (zoals " \" of zoiets in Bash)

<?php
#
# Test if commands can span multiple lines
##########################################
#
echo 
	"\n\n".
	"Here is the first line. ".

	"Here is the second line. ".
	
	# So much emptiness!

	"Here is the third line.\n\n";

Output:

strompf@dell2016$ php -f 04.php 


Here is the first line. Here is the second line. Here is the third line.

strompf@dell2016$