/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $url = 'http://search.twitter.com/trends.json'; #print_r($data); echo '<h2>Twitter trending topics ('.$data->as_of.')</h2>'; echo '<ul>'; foreach ($data->trends as $t){ echo '<li><a href="'.$t->url.'">'.$t->name.'</a></li>'; } echo '</ul>'; ?>