Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プログラムでストアアドレスを保存できます
$_address=nl2br('123\nTest',false); $config->saveConfig('general/store_information/address',$_address,'default',0);
しかし、問題は、\n使用しても新しい行に変換されないことnl2brです.何が問題なのですか?
\n
nl2br
PHP 文字列内で \n、\r、または $someVar を使用する場合は、二重引用符を使用する必要があります。
これを試して:
$_address=nl2br("123\nTest",false);