Created
February 27, 2024 22:58
-
-
Save gicolek/44b7d60f5cae00ff89a2648fc9d45fad to your computer and use it in GitHub Desktop.
Gravity Forms API Table Marup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Assuming $entry is already defined as in your previous code | |
echo '<table border="1">'; | |
echo '<tr>'; | |
echo '<th>ID</th>'; | |
echo '<th>Date Created</th>'; | |
echo '<th>Testing Field</th>'; | |
echo '<th>Second Choice</th>'; | |
// Add more <th> elements for additional fields as needed | |
echo '</tr>'; | |
foreach ($entry as $entry_data) { | |
echo '<tr>'; | |
echo '<td>' . $entry_data['id'] . '</td>'; | |
echo '<td>' . $entry_data['date_created'] . '</td>'; | |
echo '<td>' . $entry_data[1] . '</td>'; | |
echo '<td>' . $entry_data[2] . '</td>'; | |
// Add more <td> elements for additional fields as needed | |
echo '</tr>'; | |
} | |
echo '</table>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment