Im programing a Forum, and i'd like to know how to detect the Enter key on the message, to print it later just the way it was written.
Thanks.
The odds are that's when its sent, it is put in to the database with "Enters" or "Carriage Returns" set as "\n". Try doing a string replace, replacing "\n" when you print it out, or directly when it's inserted in to the database.
Use nl2br()
Check it out at: http://www.zend.com/manual/function.nl2br.php
Does exactly what you want.