Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Carriage Return on Review


sw0857

Recommended Posts

is it possible to add carriage return into review edit without implementing HTML/WYSIWYG editor? I'd like to have customers able to change to new lines when they write long review paragraphs. Anyone has done this please let me know.

 

Thanks in advance.

Link to comment
Share on other sites

is it possible to add carriage return into review edit without implementing HTML/WYSIWYG editor? I'd like to have customers able to change to new lines when they write long review paragraphs. Anyone has done this please let me know.

 

there's a php function called nl2br() that you can use on the posted data before inserting it into the database. it might be just what you need.

 

http://us.php.net/manual/en/function.nl2br.php

Link to comment
Share on other sites

Never mind.. Dave. I got it!! I have the code listed below in case anyone needs it. :)

<td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($reviews['reviews_text'])), 60, '-<br>') . ((strlen($reviews['reviews_text']) >= 99999) ? '..' : '') . '<br>'; ?></td>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...