• array (size=10)
      'comment 0' =>
        array (size=2)
          'comment_id' => string '22' (length=2)
          'parent_of' => string '0' (length=1)
      'comment 1' =>
        array (size=2)
          'comment_id' => string '23' (length=2)
          'parent_of' => string '0' (length=1)
      'comment 2' =>
        array (size=2)
          'comment_id' => string '24' (length=2)
          'parent_of' => string '0' (length=1)
      'comment 3' =>
        array (size=2)
          'comment_id' => string '25' (length=2)
          'parent_of' => string '0' (length=1)
      'comment 4' =>
        array (size=2)
          'comment_id' => string '26' (length=2)
          'parent_of' => string '24' (length=2)
      'comment 5' =>
        array (size=2)
          'comment_id' => string '27' (length=2)
          'parent_of' => string '22' (length=2)
      'comment 6' =>
        array (size=2)
          'comment_id' => string '28' (length=2)
          'parent_of' => string '0' (length=1)
      'comment 7' =>
        array (size=2)
          'comment_id' => string '29' (length=2)
          'parent_of' => string '25' (length=2)
      'comment 8' =>
        array (size=2)
          'comment_id' => string '30' (length=2)
          'parent_of' => string '29' (length=2)
      'comment 9' =>
        array (size=2)
          'comment_id' => string '31' (length=2)
          'parent_of' => string '27' (length=2)

    this is a var_dump of comment_ID and comment_parent.

    order output:
    22, 23, 24, 25, 26, 27, 28, 29, 30, 31

    right order
    22 -> 27 -> 31, 23, 24 -> 26, 25 -> 29 -> 30, 28

    [No bumping. If it’s that urgent, consider hiring someone.]

  • The topic ‘How do I get the right order of the nested comments?’ is closed to new replies.