I have a Drupal site
mydomain.com/
Within a block full php I have the following:
<?php
session_start ();
echo json_encode($_SESSION['playlist']);
?>
This code shows me correctly my array inside the session varible example:
[
"{\"title\":\"emo\",\"artist\":\"a href=\",\"mp3\":\"\"}",
"{\"title\":\"emo\",\"artist\":\"a href=\",\"mp3\":\"\"}",
"{\"title\":\"Hablando Claro Pegando Fuerte\",\"artist\":\"\",\"mp3\":\"http://red.comppa.com/sites/default/files/audios/01%20radionovela%20hablando%20claro%20pegando%20fuerte.mp3\"}",
"{\"title\":\"desobedicia\",\"artist\":\"a href=\",\"mp3\":\"\"}"
]
But if I have another file called getsession.php
with the same code:
<?php
session_start ();
echo json_encode($_SESSION['playlist']);
?>
Then I dirigo to mydomain.com/getsession.php
and shows me:
null