Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php $download=json_decode(wp_remote_retrieve_body(wp_remote_get('')));
foreach ($download as $comments){
foreach ($comments->data->children as $comment){
if($comment->data->body != null){
?><li><a href="<?php echo($comment->data->author)?>" target="_blank">
<?php echo html_entity_decode($comment->data->author); ?></a><br /><?php
echo html_entity_decode($comment->data->body); ?></li><br /><br /><ul><?php
foreach($comment->data->replies->data->children as $reply){
?><li><a href="<?php echo($reply->data->author)?>" target="_blank">
<?php echo html_entity_decode($reply->data->author); ?></a><br /><?php
echo html_entity_decode($reply->data->body_html); ?></li><br /><?php
} ?></ul><?php
} ?></ul><?php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment