Question: Where do I put code for a table around the customerID? Also how do i put in order inside PHP?

```
<html>
<head>
</head>
<body>

    <?
    $options = array(
    PDO::MYSQL_ATTR_INIT_COMMAND=> 'SET NAMES utf8',

    );
    $dsn        = 'mysql:host=localhost;dbname=username';
    $password   = 'password';
    $username   = 'username';
    $db         = new PDO($dsn, $username, $password, $options);

    $query  = "SELECT * FROM customers";
    $stmt   = $db->prepare($query);
    $stmt->execute();

    while($row = $stmt->fetch(PDO::FETCH_ASSOC))

    {

    $id         =$row['customerid'];
    $name       =$row['name'];
    echo "Customer ID: $customerid, Name: $name<br />"; 
}

?>      
</body>  
</html>

```

Can someone help me on this?

Answer: 
Do you want to show your customer ID and name in tabular format? 

Try this:

```
<table border="1"> 

 <tr>
    <th>Customer ID</th>
    <th>Name</th>
 </tr>

<?php
   $options = array(
      PDO::MYSQL_ATTR_INIT_COMMAND=> 'SET NAMES utf8',

    );

    /*Other code*/

    while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
 ?>
 <tr>
    <td><?php echo $row['customerid']; ?> </td>
    <td><?php echo $row['name'] ?> </td>
 </tr>
 <?php } ?>

</table>

```
> 
> you didn't explain what kind of order you need so i assume that you
>  need data by order of name
> 
> 
> 

replace this 

```
 $query  = "SELECT * FROM customers";

```

with 

```
$query  = "SELECT * FROM customers order by name";

```

here name is table column you can put there any column name of customer table