ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
2 marks · HTML tables
EcoVenture is a walking club. The club website allows registered walkers to record details about walking routes they complete. Data about the walkers and their completed walking routes is stored in an online database. The Walker table has four attributes listed below: Walker ( walkerID, walkerName, walkerExperience, walkerDOB ) During processing, the details stored in the Walker table have been retrieved and stored temporarily in a PHP variable called $tableData. An extract from the PHP for this process is shown below. … Line 44 echo "<table border = "2"> <tr> <th>Walker ID</th> <th>Walker Name</th> </tr>"; Line 45 Line 46 Line 47 Line 48 Line 49 Line 50 … while ($walker = mysqli_fetch_array($tableData)) { // display walker details in HTML table echo _______________________________________________; } echo "</table>"; Write the PHP statement used in Line 48 to display the details of the walkers.
'<tr> <td>'.$walker['walkerID']. '</td> <td>'.$walker['walkerName'] . '</td> </tr>'; 1 mark for two <td>…</td> pairs within <tr> … </tr> 1 mark for correct use of array and field names in correct sequence to match heading already displayed by code provided.