[development] Unsetting array elements?

Rob Barreca rob at electronicinsight.com
Wed Sep 20 20:20:37 UTC 2006

unset($_SESSION[...]) should work.

Rob Roy Barreca
Founder and COO
Electronic Insight Corporation
rob at electronicinsight.com

Nick Wilson wrote:
> Hi everyone,
> Im having a spot of bother working out how to unset an array contained
> in a session.
> This:
> unset($GLOBALS[HTTP_SESSION_VARS][partners_upload][$adId]);
> does NOT work,
> neither does using $_SESSION instead of HTTP_SESSION_VARS -- when i
> query the sessions table, the 'partners_upload' array still contains the
> $adId element (which itself is an array).
> Can anyone suggest where i might be going wrong here?
> many thanks..

More information about the development mailing list