| | |
To properly display long text in php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 24
Reputation:
Solved Threads: 0
Hi!
I'm having some problem in displaying long varchar retrieved from database on the interface.
When the text is very long, it causes the interface to stretch horizontally to display the whole text.
I've tried to use text field to display them. It can restrict the display of text in the field, but it looked a bit weird and not really nice to display text.
Is there any way to properly display the long text without affecting the interface?
Thanks in advance. Have a nice day
I'm having some problem in displaying long varchar retrieved from database on the interface.
When the text is very long, it causes the interface to stretch horizontally to display the whole text.
I've tried to use text field to display them. It can restrict the display of text in the field, but it looked a bit weird and not really nice to display text.
Is there any way to properly display the long text without affecting the interface?
Thanks in advance. Have a nice day
-1
#2 Oct 6th, 2009
Depending on the browser but your best bet is to use a div tag and use css to set the width of the div tag. Let me know how it goes.
"You never stop learning." - OmniX
•
•
Join Date: Sep 2009
Posts: 551
Reputation:
Solved Threads: 64
0
#3 Oct 6th, 2009
or else u can just specify the amount of words you want par line with 'wordwrap()' like below -
PHP Syntax (Toggle Plain Text)
$wordParLine = 10; wordwrap($string', $wordParLine);
![]() |
Similar Threads
- How to Display Motherboard Serial With PHP (PHP)
- How to display part of text from msql (PHP)
- to display user text (C++)
- Long text without spaces is cut off (DaniWeb Community Feedback)
- display google map using php (PHP)
- Positioning a long text file in a Text Box (Visual Basic 4 / 5 / 6)
Other Threads in the PHP Forum
- Previous Thread: Online Bus Ticketing System
- Next Thread: Validation for a dynamic created Texbox
| Thread Tools | Search this Thread |
# .htaccess 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link login loop mail memberships menu mlm mod_rewrite multiple mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validation validator variable video web xml youtube





