-2

In my database the Information is saved like this:

Football  ART-NR-1337 Price: 5$
Basketball ART-NR-1333 Price: 10$

Now I want to create a .php file that shows me the article like this:

Football     Basketball
ART-NR-1337  ART-NR-1333
Price: 5$    Price: 10$

Not like this, this isn't what I got but I didn't need this.

Football  ART-NR-1337 Price: 5$
SSP
  • 2,650
  • 5
  • 31
  • 49
Tobias
  • 1
  • 1
  • Not sure why you would want to do this anyway, just format the data in php. but its certainly a duplicate. – Takarii Sep 06 '16 at 08:10

1 Answers1

0

I got it

foreach($database->query($sql) as $row)             
                        {
                            echo '<tr>';
                            foreach($database->query($sql) as $row){
                                echo '<td>'.utf8_encode($row["Heldt"]).'</td>';
                            }
                            echo '</tr>';
                        }
Tobias
  • 1
  • 1