<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043414" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043414</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Duplicate index refs (key</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/unset-two-dimensional-associative-session-array#comment-1239745</link>
    <description> &lt;p&gt;Duplicate index refs (key names) in this instance are fine as they are different/separate arrays.&lt;br /&gt;
Otherwise PHP would hit an error creating them, not deleting them.&lt;/p&gt;
&lt;p&gt;As you both mentioned, echoing out at every stage is the way to find errors, and I had done this (always do) I just didn&#039;t do it on another block of code that was also accessing the session.&lt;br /&gt;
(truth be known I thought I&#039;d commented it out while testing this block &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/doh.png&quot; title=&quot;Doh!&quot; alt=&quot;Doh!&quot; class=&quot;smiley-content&quot; /&gt;)&lt;/p&gt;
&lt;p&gt;So as often is the case, it was that other piece of code that was causing the issue to the session, not the above delete loop.&lt;br /&gt;
And in the end was simply my numbtiness for not having commented out some untested code.&lt;/p&gt;
&lt;p&gt;So all is well now, cheers.&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Mar 2009 11:29:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1239745 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I&#039;m just getting vibes that</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/unset-two-dimensional-associative-session-array#comment-1239725</link>
    <description> &lt;p&gt;I&#039;m just getting vibes that having the same keys (make,colour) in two different arrays is somehow related to your problem...&lt;/p&gt;
&lt;p&gt;Have you tested it out with all unique keys?&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Mar 2009 03:17:13 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1239725 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>What is messed up about the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/unset-two-dimensional-associative-session-array#comment-1239724</link>
    <description> &lt;p&gt;What is messed up about the array once you&#039;ve done an unset on it?&lt;br /&gt;
Are you missing data?  Is there too much data?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy.&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Mar 2009 02:54:07 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1239724 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>decibel.places wrote:
Are</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/unset-two-dimensional-associative-session-array#comment-1239722</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;decibel.places&lt;/em&gt; wrote:&lt;/div&gt;Are you using cookies (default handler) for the session vars?&lt;br /&gt;
Maybe inspecting the cookie at each step will provide a clue.&lt;/div&gt;yeah as I showed above printing the array, it&#039;s storing it perfectly, there&#039;s just something wrong with the removal. I thought perhaps something to do with the unsetting within a loop and change of the session/array index within the loop, although it&#039;s not the array the loop is using that I change...&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;decibel.places&lt;/em&gt; wrote:&lt;/div&gt;So I would think your removal code may work if you add the additional level - because for one array, it is essentially two-dimensional, the first two keys are always the same, only the third one changes...&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$_SESSION[&amp;#039;test&amp;#039;][&amp;#039;car&amp;#039;][&amp;#039;make&amp;#039;]=&amp;quot;ford&amp;quot;;&lt;br /&gt;$_SESSION[&amp;#039;test&amp;#039;][&amp;#039;car&amp;#039;][&amp;#039;colour&amp;#039;]=&amp;quot;red&amp;quot;;&lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
[&#039;test&#039;] is the session name, albeit the session is an array, [&#039;car&#039;] is a key in the session array and the value for [&#039;car&#039;] is another array where [&#039;make&#039;] is one key and ford is the value, [&#039;colour&#039;] is another key and red is the value.&lt;/p&gt;
&lt;p&gt;$rem_key would be &quot;car&quot; or &quot;bike&quot; and &lt;code&gt;unset($_SESSION[&amp;#039;test&amp;#039;][$rem_key]);&lt;/code&gt; should remove that full array from the session&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Mar 2009 01:21:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1239722 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Are you using cookies</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/unset-two-dimensional-associative-session-array#comment-1239720</link>
    <description> &lt;p&gt;Are you using cookies (default handler) for the session vars?&lt;/p&gt;
&lt;p&gt;Maybe inspecting the cookie at each step will provide a clue.&lt;/p&gt;
&lt;p&gt;Isn&#039;t it actually a 3-dimensional array? &lt;code&gt;[&amp;#039;test&amp;#039;][&amp;#039;car&amp;#039;][&amp;#039;make&amp;#039;]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So I would think your removal code may work if you add the additional level - because for one array, it is essentially two-dimensional, the first two keys are always the same, only the third one changes...&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$_SESSION[&amp;#039;test&amp;#039;][&amp;#039;car&amp;#039;][&amp;#039;make&amp;#039;]=&amp;quot;ford&amp;quot;;&lt;br /&gt;$_SESSION[&amp;#039;test&amp;#039;][&amp;#039;car&amp;#039;][&amp;#039;colour&amp;#039;]=&amp;quot;red&amp;quot;;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 24 Mar 2009 00:44:36 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1239720 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
