Jump to content

Rewrite as a session variable


fezzik

Recommended Posts

I need help with correctly rewriting the below script as a session variable, primarily the correct way to write $numbers[$id] as a session array:

if (isset($numbers[$id])) {
  $numbers[$id] += $another_count;
} else {
  $numbers[$id] = $another_count;
}

foreach($numbers as $key => $val) echo $key . ' : ' . $val . "<br />\r\n";

Thank you for any assistance! Fezzik
Link to comment
https://forums.phpfreaks.com/topic/26863-rewrite-as-a-session-variable/
Share on other sites

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.