سؤال

<textarea><?php echo "Hello <br/> word!";?></textarea>

Output is:

Hello <br/> word!

My question is how to get line break,but not display <br/> ?

هل كانت مفيدة؟

المحلول

Use \n instead of <br/>. But make sure you use " instead of ', like the example below.

<textarea><?php echo "Hello\nWorld!";?></textarea>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top