I apologize if I'm not making myself clear. I'm really new to PHP.
The times I've imploded something
<?php
$query="SELECT * FROM $tbl_name WHERE id ='10'";
$result=mysql_query($query);
while ($row = mysql_fetch_array($result))
{
$array = array('<h5>', ($row['p1']), '</h5>', '<h5>', ($row['act']), '</h5>', '<h5>', ($row['p2']), '</h5>', '<h5 class="update1">', ($row['up1']), '</h5>', '<h5 class="update2">', ($row['up2']), '</h5>', '<h5 class="update3">', ($row['up3']), '</h5>', '<h5 class="update4">', ($row['up4']), '</h5>', '<h5 class="update5">', ($row['up5']), '</h5>', '<h5 class="update6">', ($row['up6']), '</h5>', '<h5 class="update7">', ($row['up7']), '</h5>', '<h5 class="update8">', ($row['up8']), '</h5>', '<h5 class="update9">', ($row['up9']), '</h5>', '<h5 class="update10">', ($row['up10']), '</h5>');
$comma_separated = implode(" ", $array);
echo $comma_separated;
}
mysql_free_result($result);
?>
What echoes is a horizontal line of print.
p1 act p2 extra up1 up2 ...
What I am looking to do now, is have it print vertically, like a column as opposed to a row:
p1
act
p2
extra
up1
up2
...
And in the process, implode the line, so if there is any blank cells in my db table, the next row with information in it would proceed the previous row with information, and there wouldn't be a blank space (empty line) between the two.
Thank you for all your guidance. I appreciate it.