Making Json objects using Session Variables in another file
<p><br>
I was trying to make a Json Object of some variables Which I am using as Session variables, But I am not geting the proper Response To make it as Json Object ..<br>
Some Code which I tried (for Reference) Sharing Below..</p>

<pre><code>//Passing the Variable To another PHP File
        session_start();
            $_SESSION['EmailIds']=$strEmailIds;
            $_SESSION['SCHOOL_NAME']=$SCHOOL_NAME;
//sending data to another php page ..
        header('Location: ../SecondPage.php');
</code></pre>

<p>In second file SecondPage.php Where i was Using This Session..<br></p>

<pre><code>session_start();
$SCHOOL_NAME = $_SESSION['SCHOOL_NAME'];//1
$EmailIds= $_SESSION['EmailIds'];//1 &lt;br&gt;
</code></pre>

<p>Now trying to make this Session Variable in Json OBject...????<br></p>

<pre><code>var OBJ = jsonObj.(SCHOOL_NAME+EmailIds);// Confuse with THis Line&lt;br&gt;
</code></pre>

<p>Actuaaly Not Getting What is the Good Approach To make this variables as Json Objects..<br>
AS I Made this Json Object I can Use This AS another Purpose Like to send as Ajax Data and etc..</p>