i have a table in mysql db where
|Names|
|Name 1|
|Name 2|
|Name 3|
|Name 4|
|Name 5|
|Name 6|
|Name 7|
i want show them into html like
Names||Name 1||Name 2|Name 3|Name 4|Name 5|Name 6|Name 7|
like this.
i have a table in mysql db where
|Names|
|Name 1|
|Name 2|
|Name 3|
|Name 4|
|Name 5|
|Name 6|
|Name 7|
i want show them into html like
Names||Name 1||Name 2|Name 3|Name 4|Name 5|Name 6|Name 7|
like this.
I don’t know how you code is setup or how you retrieve it, but you could do something like this
[php]while ($entry = $displayBlog->fetch(PDO::FETCH_OBJ)) {
echo ‘<p class="namesStyle>’ . $entry->names . ‘
then in CSS you could stylize the class namesStyles (or whatever you call it) to get the desire look.
This is only a guess on how to do it in CSS or close enough and this is obviously not tested:
.namesStyle {
display: inline-block;
width: 100%;
max-width: 150px;
height: 30px;
line-height: 30px;
border-right: 1px solid #2e2e2e;
padding: 0 5px;
}
HTH John
I cannot see any reason whatsoever why you would design a table like this:
|Names| |Name 1| |Name 2| |Name 3| |Name 4| |Name 5| |Name 6| |Name 7|
What are you actually trying to store?