Solved

how to have multiple line in php html table

Posted on 2008-10-08
3
635 Views
Last Modified: 2012-05-05
I have the following code with dynamic field $liste
if $liste is not too long it is OK
if $liste is very long I have not all the records some go behind at the right.
How to have the html page with table multi lines?

<table class='tab_no_border' style='width:550px;margin-left:15px'><COL width=750 align='left'></COL><TR><TD class='td_titre_col' style='padding-left:5px;'>liste des costs</TD></TR><TR><TD class='td_cadre' style='padding-left:5px;'><? echo $liste; ?></TD></TR></TABLE>
0
Comment
Question by:davidgfi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Assisted Solution

by:Ivo Stoykov
Ivo Stoykov earned 250 total points
ID: 22667741
try this
0
 
LVL 22

Assisted Solution

by:Ivo Stoykov
Ivo Stoykov earned 250 total points
ID: 22667744
forgot snippet ;-((
<TD class='td_cadre' style='padding-left:5px;WORD-BREAK:BREAK-ALL;'><? echo $liste; ?></TD>

Open in new window

0
 
LVL 1

Accepted Solution

by:
ShinyDarkStone earned 250 total points
ID: 22667870
im thinking in a function, but i need to know if u want to "Wrap" the text.
the simple way its when you take out from the database and do the query, you should do something like this




while($davidgfi_query){
 
$liste = $liste + "<tr><td> . ".$value_of_davidgfi." . </td></tr>"
 
}

Open in new window

0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question