I would like to know how to `echo` an array records one by one with button click to print both forward and revers records.

```
$query = "SELECT * FROM printingorder WHERE recHead = 'Pending'";
$result = mysql_query($query);

```

if I used 

```
while($postate = mysql_fetch_array($result)){ 
    echo  "<h4>" .'1. Faculty : '. $postate['facultyId'] ."</h4>";
    echo  "<h4>" .'2. Department : '. $postate['departmentId'] ."</h4>";
    echo  "<h4>" .'3. Programm : '. $postate['programmId'] ."</h4>";
}

```

it prints all records after each raw contents.But I need only one complete raw content and next raw with button click(or hyperlink) for both forward and revers array records.