Array_push() takes an array as it's first parameter. In your case you have an array of arrays (NOT a 2 dimensional array) and to add an element on to the end of one of them you need to pass the name of the element of the top level array you want to add an element to into the function.
I.e. if you have $fred[0] = array(1,2,3); $fred[1] = array(4,5,6); array_push($fred[1], 7) will leave $fred[0] = array(1,2,3); $fred[1] = array(4,5,6,7); or array_push($fred[0], 7) will leave $fred[0] = array(1,2,3,7); $fred[1] = array(4,5,6); Tim Ward www.chessish.com <http://www.chessish.com> ---------- From: brendan conroy [SMTP:[EMAIL PROTECTED]] Sent: 20 February 2002 12:27 To: [EMAIL PROTECTED] Subject: novice question -- array_push($real[$i][$j],$s[$j]);???????? Hi, thanks for reading this, Iam trying to push elements into a two dimentional array, but I cant find the proper syntax, I'd be grateful if someone could email me the proper method. Iam using the normal method, which worked fine for a one dimentional array, but when I use it for a two dimentional array, it doesnt seem to recognise that is an array, even though I initialized the array with $real[0][0] = 0;. Thanks a million for your time, Bren _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php