<?php // okay I was wondering something about loops // say I wanted to get all comments from a db // that's easy with a `foreach` loop // but what if I want to get a reply for each comment in that foreach loop? // well I'd have to put a foreach loop within a foreach loop, no biggy. // but what happens if you'd want an infinite checker that checks a reply // ect. e.g: foreach($comments as $comment) { // output comment // say the nest_id is the id of a comment and the nest_id // is nested as a comment's reply // this is easy foreach($comment->nest_id as $comment_nest) { } } // basically is it possible to loop through something, // then automatically loop another time if there is a reply to a comment // and if there is a reply to that reply then automatically get that? // seems rather complicated.
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`