Skip to content

Instantly share code, notes, and snippets.

@gicolek
Created February 27, 2024 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gicolek/44b7d60f5cae00ff89a2648fc9d45fad to your computer and use it in GitHub Desktop.
Save gicolek/44b7d60f5cae00ff89a2648fc9d45fad to your computer and use it in GitHub Desktop.
Gravity Forms API Table Marup
<?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