Q:

Return to ajax with while loop through PHP

I have got this ajax
$.ajax({
                        type: "GET",
                        url: '../connect.php',
                        data: "OrB=" + ajaxsend+"&&IOr="+i,
                        success: function(data)
                        { 
                             var x = $.parseJSON(data);
                             var el='<div class="CommentsAw Comment_Hs">\
                                      <img src="../users/'+x[0]+'">\
                                      <span>'+x[1]+'</span>\
                                      <span class="s2">'+x[2]+'</span>\
                                    </div>'
                                    $(".F_W_comments").html().remove();
                                    $(".F_W_comments").html(el);
                        }
        });

and php
if (isset($_GET['OrB'])) {
        $OB=$_GET['OrB'];
        $I=$_GET['IOr'];
        if ($OB=='OO') {
            $OB='`Date` ASC';
        }else if ($OB=='No') {
            $OB='`Date` DESC';
        }
        $query=$con->query("SELECT id,comment FROM uploads WHERE Rand='$I'");
        $row=$query->fetch_row();
        $Commentsq=$con->query("SELECT * FROM (SELECT * FROM comments WHERE Post_id='$row[0]' ORDER BY $OB LIMIT 4) AS sub ORDER BY `DATE` ASC") or die($con->error);
        while ($CommentRow=$Commentsq->fetch_row()) {
                $CommenterPp=$con->query("SELECT Profile_pic FROM user_opt WHERE Username='$CommentRow[3]'");        
                $CommenterPicture=$CommenterPp->fetch_row();
                $CommenterPp=$con->query("SELECT Username FROM users WHERE Id='$CommentRow[3]'");        
                $CommenterName=$CommenterPp->fetch_row();
                echo json_encode(array($CommenterPicture,$CommenterName,$CommentRow));             
        }
    }

But it gives me error in console like this one
VM654:2 Uncaught SyntaxError: Unexpected token [ in JSON at position 107
[["5734919677561.jpg"],["Murad"],["1842","3","21","1","2016-05-08 21:56:52"]]                    
                [["5734919677561.jpg"],["Murad"],["1843","GOodm","21","1","2016-05-08 21:56:54"]]                    
                [["5734919677561.jpg"],["Murad"],["1845","re","21","1","2016-05-08 21:56:54"]]                    
                [["5734919677561.jpg"],["Murad"],["1844","re","21","1","2016-05-08 21:56:54"]]                    

What i want is connect.php to get data from database and then pass it to ajax.
But the result was nothing probably bcause there is some error in my code

A:

Echoing several json-encoded strings does not mean a valid json.
What you need to do is json_encode your data and echo it once.
$commenters = array();    // result array
while ($CommentRow=$Commentsq->fetch_row()) {
    $CommenterPp=$con->query("SELECT Profile_pic FROM user_opt WHERE Username='$CommentRow[3]'");        
    $CommenterPicture=$CommenterPp->fetch_row();
    $CommenterPp=$con->query("SELECT Username FROM users WHERE Id='$CommentRow[3]'");        
    $CommenterName=$CommenterPp->fetch_row();
    $commenters[] = array($CommenterPicture,$CommenterName,$CommentRow);             
}
// while loop over
echo json_encode($commenters);

And in your js you should iterate over an array of objects, not a simple object, for example:
success: function(data) {
    var x = $.parseJSON(data);
    for (var k in x) {
        console.log(x[k]);
    }
}

