\n
is used for Unix systems (including Linux, and OSX).
\r\n
is mainly used on Windows.
\r
is used on really old Macs.
PHP_EOL
constant is used instead of these characters for portability between platforms.
Related Posts:
- Array to String PHP?
- How do I check if a string contains a specific word?
- how to replace quotation marks with \”
- PHP random string generator
- Mixing a PHP variable with a string literal
- Converting string to Date and DateTime
- PHP: variables in strings without concatenation
- Multi-line strings in PHP
- Uncaught Error: Call to undefined function mysql_escape_string()
- How can I capture the result of var_dump to a string?
- How to convert string to boolean php
- Check if URL has certain string with PHP
- Limit String Length
- Insert string at specified position
- Remove empty array elements
- What is a slug?
- PHP “or” Syntax
- What are namespaces?
- Invalid column count in CSV input on line 1 Error
- How to check if a string starts with a specified string?
- mysqli_real_connect(): (HY000/2002): No such file or directory
- What is difference between PHP cli and PHP cgi?
- Why use $_SERVER[‘PHP_SELF’] instead of “”
- phpMyAdmin: secret passphrase?
- What’s the purpose of ini_set() in php? (especially for error reporting)
- PHP how to make URL something like product.php?id=1
- Send email with PHP from html form on submit with the same script
- How to insert an item at the beginning of an array in PHP?
- PHP Deprecated: Methods with the same name
- How do I pass JavaScript variables to PHP?
- Call to undefined function curl_init().?
- How to verify password against database?
- what is a good method to sanitize the whole $_POST array in php?
- Finding the number of days between two dates
- Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes)
- MySqli Commands out of sync; you can’t run this command now
- Trying to get property of non-object in
- Difference between $_SERVER[‘DOCUMENT_ROOT’] and $_SERVER[‘HTTP_HOST’]
- CURL ERROR: Recv failure: Connection reset by peer – PHP Curl
- Fix Access denied for user ‘root’@’localhost’ for phpMyAdmin
- Getting connection failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
- “Cannot send session cache limiter – headers already sent”
- Refresh a page using PHP
- Laravel 5.2 Storage::makeDirectory($dir) is not creating directory
- Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
- SSL error SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- PDO closing connection
- “Valid CSRF Token Required” in Osticket After login?
- nginx: connect() failed (111: Connection refused) while connecting to upstream – after update nginx –
- ‘xmlParseEntityRef: no name’ warnings while loading xml into a php file
- Child theme css not overriding parent
- Convert timestamp to readable date/time PHP
- Creating a php search bar
- What does ‘=' mean in PHP?
- Parsing domain from a URL
- PHP class not found but it’s included
- How to fix the session_register() deprecated issue?
- Laravel 5 Class ‘Collective\Html\HtmlServiceProvider’ not found on AWS
- PHP to write Tab Characters inside a file?
- MySQL query to get column names?
- Fatal error: Out of memory, but I do have plenty of memory (PHP)
- Are There Any Cron Jobs Alternative?
- How to Create Multiple Where Clause Query Using Laravel Eloquent?
- PHP: How to get referrer URL?
- Changing permissions via chmod at runtime errors with “Operation not permitted”
- php – How do I fix this illegal offset type error
- Warning: A non-numeric value encountered
- Proper Format of iframe in PHP?
- How to find the last day of the month from date?
- Getting ’ instead of an apostrophe(‘) in PHP
- php_network_getaddresses: getaddrinfo failed: Name or service not known (0) Failed To Connect..!
- WooCommerce action hooks and overriding templates
- Updating php version on mac
- Composer: Command Not Found
- Undefined variable: $_SESSION
- Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
- The character encoding of the HTML document was not declared
- Notice: Undefined offset: 0 in
- How to Sort a Multi-dimensional Array by Value
- How to get time difference in minutes in PHP
- How to write a link like which link to the same page in PHP?
- How to write a link like which link to the same page in PHP?
- Download files from server php
- No query results for model [App\Products] Laravel
- Sending POST data without form
- Resetting MySQL Root Password with XAMPP on Localhost
- PHP + JQuery – How to use these two together? Please see my example
- Data extraction from /Filter /FlateDecode PDF stream in PHP
- How to use data-saferedirecturl in a tag in PHP?
- PHP date yesterday [duplicate]
- Clear cache in Symfony: `cache:clear` or `rm -rf`?
- Is there any difference between aes-128-cbc and aes-128 encryption?
- Convert timestamp to readable date/time PHP
- create php live clock
- In where shall I use isset() and !empty()
- Converting a UNIX Timestamp to Formatted Date String
- PHP Call to undefined function
- Formatting a number with leading zeros in PHP
- POST an array from an HTML form without javascript