Reputation: 1205
My goal is to store a newline character in an array. I want to display it later on a site.
$settings['standard'] = array(
'title' => __( 'Standard', 'foo' ),
'description' => __( 'description text with
newline character', 'fooMore' ));
the output have to something like this:
description text with
newline character
Upvotes: 0
Views: 220
Reputation: 2839
$settings['standard'] = array(
'title' => __( 'Standard', 'foo' ),
'description' => __( 'description text with' . PHP_EOL . 'newline character', 'fooMore' ));
PHP_EOL is the End Of Line character for your current environment (LF, CR or CRLF).
Upvotes: 4