Hi so i was wondering how do i get a load of string from a mysql database and put them in a input area with a return between 开发者_如何转开发each value such as
Hi
My Name Is Joris
Thanks,
JorisWhen you're creating a <textarea>
in a form, the text between the <textarea>
and </textarea>
tags is the default text for the text area. You just need to build a pair of these with the string you want between them, like this: <textarea>$string</textarea>
. Do the query and the concatenating in PHP using \n
for newlines.
You can simply add a carriage return after each string and then output this within the required textarea.
For example:
<?php
$cr = "\n";
$bigString = 'Hello' . $cr . 'there.';
echo '<textarea>' . $bigString . '</textarea>';
?>
精彩评论