Jump to content

Archived

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

Birdman203

session array problem

Recommended Posts

[code]
$count_session = count($_SESSION['topics']);
$id = $_GET['id'];
$array_session = array(
'id' => $id
);
$array_session2[$count_session] = $array_session;
$set_session = $_SESSION['topics'][$array_session2];
[/code]

how come this doesnt work? or am i doin somethin wrong?

Share this post


Link to post
Share on other sites
Try:
[code]
$count_session = count($_SESSION['topics']);
$id = $_GET['id'];
$array_session = array(
'id' => '$id'
);
$array_session = $array_session2[$count_session];
$set_session = $_SESSION['topics'][$array_session2];
[/code]

Share this post


Link to post
Share on other sites

×

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.