
31 Jul
2001
31 Jul
'01
11:53 a.m.
Hi, sometimes we want to beautify the code by inserting line feeds, like this: <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"> <?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea> The problem here is the line feed inserted before the last <?php, it inserts unwanted characters into the textarea. Correct code will not be so pretty: <textarea name="fields[<?php echo urlencode($field); ?>]" rows="<?php echo $cfgTextareaRows; ?>" cols="<?php echo $cfgTextareaCols; ?>"><?php if (!empty($special_chars)) echo $special_chars . "\n"; ?> </textarea> Marc