Hi,
I have a textarea that users enter data into and another form on a different page that gets the data the user previously entered and displays only the first 48 characters using strpos()
This works ok, but it doesn't work when the user has pressed enter when typing - here is the code I am using:
PHP Code:
$notes=$getEventId['notes']." "; $chars = 48; $notes = $notes." "; $notes = substr($notes,0,$chars); $notes = substr($notes,0,strrpos($notes,' ')); $notes = $notes."...";
How can the above code be modified to work when the user has pressed the enter key?
Thanks,
|