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

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??

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.