Ajax Call in PHP and jQuery
<p>This is my functions.php script containing the following code. The array is encoded into JSON.</p>

<p><strong>functions.php</strong></p>

<pre><code> $final['custom']['main'] = queryCustom($conn, $id);
 echo json_encode($final);
</code></pre>

<p>My <strong>global.js</strong> has the following code which makes an AJAX request in jQuery:</p>

<pre><code>$.ajax({
            type: "POST",
            url: "functions.php", // file to reach Ajax call
            dataType: "json", 
            data: { 
                action: 'custom',
                id: id,
                  },
                success:
                function(data) {

                setCustom(data.custom);
</code></pre>

<p>I want to know what the <code>data</code> contains in <code>function(data)</code>? The <code>setCustom(data.custom)</code>, what does this mean here? Can someone provide me an explanation of this please? </p>