Jump to content

How to make an array out of session values[integers]


flit

Recommended Posts

Hi there,

 

Can anyone help me make an array out of session values?

The session file looks like this:

sessionvar|s:7:"3,2,1";

 

Example:

$id = $_SESSION['sessionvar'];

 

echo $id ==->3,2,1

 

While ......

$query = "SELECT * FROM books where id=$id[0]"

.....

.....

Loop

 

In the first loop the first array must be used[0]

In the second loop the second array must be used[1]

In the third loop the third array must be used[2]

 

-->???

$id = array[$id];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.