| | |
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: 525
Reputation:
Solved Threads: 61
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 |
advanced apache api array basics beginner binary broken cakephp check checkbox class cms code codingproblem combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert ip javascript job joomla js limit link login mail menu mlm mobile multiple mysql oop outofmemmory paging parse password paypal pdf php problem procedure query radio ram random recursion remote script search server sessions smarty sms source space sql stored syntax system table traffic tutorial unicode up-to-date update upload url validator variable video web webapplications websitecontactform youtube





