Forum Moderators: coopster

Message Too Old, No Replies

session and array issues

         

kadnan

7:54 am on Dec 14, 2002 (gmt 0)

10+ Year Member



in my last post i asked about deailing arrays in sessions
I am still having same problem

if( isset($_SESSION['pid'
{
$arrPid=array($_SESSION['pid']);
}
array_push($arrPid,'$pid');
$_SESSION['pid']=$arrPid;

This isn`t inserting new values at the end of arrays it adds two values after that when i add 3rd one it overwrites all values in array but not add new one

please Help me
Thanx

aspr1n

12:26 pm on Dec 14, 2002 (gmt 0)

10+ Year Member



kadnan,

[php.net...]

instead of: array_push( $arrPid, '$pid' );

try: array_push( $arrPid, $pid );

asp

[edited by: jatar_k at 7:29 pm (utc) on Dec. 14, 2002]

jatar_k

7:31 pm on Dec 14, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



did this help kadnan or are there still problems?

kadnan

10:40 pm on Dec 14, 2002 (gmt 0)

10+ Year Member



yes there was nothing wrong with array,i MYSELF was applying wrong logic:>
thanx