summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2007-09-10 18:37:12 +0200
committerDerek Jones <derek.jones@ellislab.com>2007-09-10 18:37:12 +0200
commit4f95353d295455ee740aec7ee1b5060195bff987 (patch)
tree1d43f1e303b850f820beab1272335f8af946598b /user_guide/libraries
parent2189f2a5974c5fc9fe6016d7340c0205a570b9c9 (diff)
fixed docs for unset_userdata()
Diffstat (limited to 'user_guide/libraries')
-rw-r--r--user_guide/libraries/sessions.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html
index 22d46e665..94eb3ca8f 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -176,10 +176,10 @@ encryption process in particular produces a longer data string than the original
<h2>Removing Session Data</h2>
<p>Just as set_userdata() can be used to add information into a session, unset_userdata() can be used to remove it, by passing the session key. For example, if you wanted to remove 'some_name' from your session information: </p>
<p><code>$this-&gt;session-&gt;unset_userdata('some_name');</code></p>
-<p>This function can also be passed an array of items to unset.</p>
-<p><code>$array_items = array('username', 'email');<br />
+<p>This function can also be passed an associative array of items to unset.</p>
+<p><code>$array_items = array('username' => '', 'email' => '');<br />
<br />
-$this-&gt;session-&gt;set_userdata(<samp>$array_items</samp>);</code></p>
+$this-&gt;session-&gt;unset_userdata(<samp>$array_items</samp>);</code></p>
<h2>Flashdata</h2>
<p>CodeIgniter supports &quot;flashdata&quot;, or session data that will only ba available for the next server request, and are then automatically cleared. These can be very useful, and are typically used for informational or status messages (for example: &quot;record 2 deleted&quot;).</p>
<p>Note: Flash variables are prefaced with &quot;flash_&quot; so avoid this prefix in your own session names.</p>