Dipesh Kc Dipesh Kc - 1 year ago 99
JSON Question

serialise php session variables into json format

I want to access PHP session variables through jQuery. What is the best way to do so?

Answer Source
<?php
echo json_encode($_SESSION);
?>

Be careful what you store in the session though. ;)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download