ljcharlie
10-24-2003, 10:48 AM
Is there a way to put a carieage return in textarea? In PHP, I want to echo a cariage return in a TextArea box. Any help is appreciated!
ljCharlie
ljCharlie
|
Click to See Complete Forum and Search --> : Carieage return in TextArea ljcharlie 10-24-2003, 10:48 AM Is there a way to put a carieage return in textarea? In PHP, I want to echo a cariage return in a TextArea box. Any help is appreciated! ljCharlie pyro 10-24-2003, 11:02 AM Using \n should work (if you use double quotes for the echo): <?PHP echo "<textarea cols=\"25\" rows=\"5\">\n\ntest</textarea>"; ?> ljcharlie 10-24-2003, 11:10 AM Thankyou very much for your help. I'll give that a try. ljCharlie pyro 10-24-2003, 11:14 AM Sure thing... :) ljcharlie 10-24-2003, 11:38 AM Sorry to bother you again, but I received an error. This is my code. <?PHP $photoOrderd = <?"Photos you ordered are:\n\n"; if ($txtChkBox1 <> ""){ $photoOrderd += .$txtChkBox1."\n"; } ?> The error I received is: Parse error: parse error in line 167 which is this line: $photoOrderd += .$txtChkBox1."\n"; Is it the += operator? ljCharlie ljcharlie 10-24-2003, 11:44 AM I think I found the problem and it has to do with the ". "; however, I do not know how to fix it. I want to add the dot so I can connect multiple variables but it's giving me the error. ljCharlie YoN 10-24-2003, 11:45 AM change $photoOrderd = <?"Photos you ordered are:\n\n"; to $photoOrderd = "Photos you ordered are:\n\n"; pyro 10-24-2003, 11:48 AM Make the change that YoN pointed out, and also change: $photoOrderd += .$txtChkBox1."\n"; to: $photoOrderd .= $txtChkBox1."\n"; ljcharlie 10-24-2003, 12:07 PM PERFECT! You guys are GENIUS!! Thank you! ljCharlie pyro 10-24-2003, 12:12 PM No problem... webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |