/ Published in: PHP
Make your spreadsheet public to get a key like this: 0AsfENoKj1ir7dE8yR6U0aUtpdTVNM20wRlNJOhZaclG
Set it on the script and you're all done.
Set it on the script and you're all done.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $key = '0AsfENoKj1ir7dE8yR6U0aUtpdTVNM20wRlNJOhZaclG'; $json_string = file_get_contents("https://spreadsheets.google.com/feeds/list/$key/od6/public/values?alt=json"); foreach ($obj->{'feed'}->{'entry'} as $entry) { echo "<p>"; $num_column = 0; foreach ($answer as $a) { { $a = $a[1]; $num_column++; echo "<b>$num_column:</b> $a<br/>"; } } echo "</p>"; } ?>