0

Hi,
I am having 100 records in my database and i fetch them from database.
Now i am displaying it in table i want to display it like
1 2
3 4

in different td.
But when i give query it echo in stringht line
1
2
3
4

.
Solution to divide it in two td.
Thankx

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by mahe4us
0

are your trying to formnat the
1 2
3 4
in your HTML or in the Query it self??

what is your current code that returns the straight line, is that your SQL??

What Database are you using, can you create a Cursor??

0

are your trying to formnat the
1 2
3 4
in your HTML or in the Query it self??

what is your current code that returns the straight line, is that your SQL??

What Database are you using, can you create a Cursor??[/quote]

code

<?php
  require_once('../mysql_connect.php');
  $query="select * from article_directory order by category asc";
  $result=mysql_query($query);
  while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
  {;?>
   <tr>
        <td><?php echo $row['category'];?></td>
       <td><?php echo $row['category'];?></td>
   <?php } ;?>

It returns category
i need output like

1category          2category
3category          4category

(assume table structure)

it is returning

1category
2ctegory 

so on

Thankx

Edited by pyTony: fixed formatting

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.