Q:

Json doesn't work

I am trying to pull random string from database, and then transfer it via json.
But, I am clearly stuck here.
<?php

print_r ($return['user_id']);
json_encode($return);

?>

And the ajax/js
$(document).ready(function() {
     $.getJSON('initiate.php', function(data) {
        $("#chat-area").html(data);
     });   
});

A:

It cannot work with:

that print_r dumping garbage (i.e. non-JSON) to the client and thus the JSON parser
you not actually echoing the JSON data.

So, what you want, is this:
<?php
// obviously $return needs to contain something. otherwise
// you'll most likely get a notice which is "garbage" too
echo json_encode($return);
?>

After fixing the server-side code you also need to fix your JavaScript. data is an object and thus it does not make much sense to set it as some element's HTML content. You probably want some property of that object:
$.getJSON('initiate.php', function(data) {
    $("#chat-area").html(data.whatever);
});

