$php_mysql$ Posted August 7, 2011 Share Posted August 7, 2011 friend when ever a user submits date like this is a test and i want to test etc etc till 80 characters it would print ok something like this is a test and i want to test etc etc but if user post junk like mmmmmmmmmmmmmddddddddddddddddjjjjjjjjjjjjjjjjjjjjjj continious 80 character then my table moves out of my main content, how can i make even the mmmmmmmmmmmmmddddddddddddddddjjjjjjjjjjjjjjjjjjjjjj to print like mmmmmmmmmmmmmdddddddd ddddddddjjjjjjjjjjjjjjjjjjjjjj i mean make a break if users types continious? Quote Link to comment Share on other sites More sharing options...
trq Posted August 7, 2011 Share Posted August 7, 2011 word_wrap. Quote Link to comment Share on other sites More sharing options...
$php_mysql$ Posted August 7, 2011 Author Share Posted August 7, 2011 i wanted to display something like say in this forums image td =50x50 text td 300px time td 100px how can i do that i want to have these fields fixed so that it looks good? Quote Link to comment Share on other sites More sharing options...
$php_mysql$ Posted August 7, 2011 Author Share Posted August 7, 2011 if the words are like $text = "Thequickbrownfoxjumpedoverthelazydog."; $newtext = wordwrap($text, 20, "<br />\n"); echo $newtext; then even the results pring like Thequickbrownfoxjumpedoverthelazydog how can i wrap this then? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted August 7, 2011 Share Posted August 7, 2011 Did you read the manual entry, particularly the 4th parameter called 'cut'? Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted August 8, 2011 Share Posted August 8, 2011 you could for the client side add (in your stylesheet): .breakitup{word-wrap: break-word;} But it's better to control this server side, because this little snippet doesn't work very well cross browser. SO make sure you read the manual entry Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.