Can anybody tell me, why PHP_EOL is not working on my Mac?
Code:
echo 'This is first line'.PHP_EOL.'This is second line';
Can any body help me through this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m just going to guess that you’re looking at the result in your browser, where whitespace is collapsed. PHP may output this:
But the browser renders it like this:
To insert an explicit line break in HTML, use the
<br>tag.