Hard time using PHP_EOL at end of echo statement

I’m very new to php and created this script:

<?php
define("FOLDERNAME","MyFolder");
echo FOLDERNAME.': MiscTextAfterward...';
echo "MiscTextBEFORE...".FOLDERNAME;
?>

After defining “FOLDERNAME” I used two
echo statements, one to echo “FOLDERNAME”
with text coming Afterward, and the other to echo
statement with text before “FOLDERNAME”

What I’m now trying to do is add PHP_EOL at the
end of echo FOLDERNAME.’: MiscTextAfterward…’;

Having difficulty finding the correct syntax for this.
Have seen many examples of PHP_EOL but not
yet found one for exactly what I’m trying to do.

Assistance would be kindly appreciated!

Fwiw I am able to use the br command, but I’d
also like to know how to use PHP_EOL at the end.

PHP_EOL is just a pre-defined constant. You would concatenate (what the . operator does) it onto the end of the string you are building and echoing.

Whitespace is ignored in html… and newlines are whitespace… so they dont get displayed…
Use html not straight text…
instead of PHP_EOL

Sponsor our Newsletter | Privacy Policy | Terms of Service