Monsenhor enVide neFelibata Monsenhor enVide neFelibata - 2 months ago 7
PHP Question

How to output new lines or break lines on a CRON JOB using a PHP file

OK, ... here is the deal. I have already have a php file on my server on the cron job is doing it's job correctly.

I do receive the cron job output by email... that means all the ECHO stuff is being sent after the cron runs.

How to output new lines or break lines on a CRON JOB using a PHP file. That's my question.

I'm doing echo

<br>
and I even tried
\n
and
\r\n
... is there a correct way to do so? Since the email that i receive is just a bunch of text in one single line.

Should i add some headers to it?

Answer
echo "your text \n";

Note: Make sure you use "". Double quotes.

OR

try

echo "your text " . PHP_EOL;