GREAT. This does the trick for me. Thanks a lot. I am now getting the output I want, so I can now feel confident about inputting this into the actual database. -----Original Message----- From: Katie Evans-Young [mailto:katie682@comcast.net] Sent: Wednesday, March 12, 2003 11:21 AM To: NIPP, SCOTT V (SBCSI) Subject: RE: Easy array question... It's actually putting the whole of the array $other as the first element of the array $other2. You're going to have to step through the array to copy it. foreach($other as $element) { $other2[] = $element; } //end foreach -----Original Message----- From: NIPP, SCOTT V (SBCSI) [mailto:sn4265@sbc.com] Sent: Wednesday, March 12, 2003 11:10 AM To: 'jvilla@isdesigndev.com'; 'Hutchins, Richard'; php-db@lists.php.net Subject: RE: Easy array question... Here is basically what I have and what I am getting... The section of code to copy and then process the copied array: $other2 = array(); array_push($other2, $other); foreach ($other2 as $test) { if ($test == "") { echo "NOTHING"."<br>"; } else { echo $test."<br>"; } } Basically, what I want is if the array element is nothing, then output as a test NOTHING. If the array element has some value, then output as a test that value. Currently, from this code the output I am actually getting is: Array Thanks again. -----Original Message----- From: Jonathan Villa [mailto:jvilla@isdesigndev.com] Sent: Wednesday, March 12, 2003 10:58 AM To: jvilla@isdesigndev.com; NIPP, SCOTT V (SBCSI); 'Hutchins, Richard'; php-db@lists.php.net Subject: RE: Easy array question... Sorry, I just reread your post $array_copy = array(); array_push($array_copy, $original_array); echo $array_copy[0];//or whatever to test ---> Jonathan -----Original Message----- From: Jonathan Villa [mailto:jvilla@isdesigndev.com] Sent: Wednesday, March 12, 2003 10:56 AM To: 'NIPP, SCOTT V (SBCSI)'; 'Hutchins, Richard'; php-db@lists.php.net Subject: RE: Easy array question... $array_copy = array(); array_push($array_copy, $_SESSION['original_array']); echo $array_copy[0];//or whatever to test ---> Jonathan -----Original Message----- From: NIPP, SCOTT V (SBCSI) [mailto:sn4265@sbc.com] Sent: Wednesday, March 12, 2003 10:43 AM To: 'Hutchins, Richard'; 'php-db@lists.php.net' Subject: RE: Easy array question... I don't think that is the case because I am able to access the original array in this same page without having to use the session variable reference. Won't hurt to give it a try though. Thanks for the feedback. -----Original Message----- From: Hutchins, Richard [mailto:Richard.Hutchins@Getingeusa.com] Sent: Wednesday, March 12, 2003 10:40 AM To: 'php-db@lists.php.net' Subject: RE: Easy array question... Are you using: $array2 = $_SESSION["array1"]; Not sure that will do the trick, but it was my first inclination. Rich > -----Original Message----- > From: NIPP, SCOTT V (SBCSI) [mailto:sn4265@sbc.com] > Sent: Wednesday, March 12, 2003 11:37 AM > To: 'php-db@lists.php.net' > Subject: Easy array question... > > > I create an array on one page and then process it on > the next page > as I have registered the array as a session variable. I need > to basically > process one of these arrays twice, so I want to make a copy > of the array. > The question is how do I do this? I have tried the following: > > $array2 = $array1; > > This doesn't seem to do the trick for me. Is this > correct and I am > just missing something elsewhere, or is there another way to > copy an array? > Thanks. > > Scott Nipp > Phone: (214) 858-1289 > E-mail: sn4265@sbc.com > Web: http:\\ldsa.sbcld.sbc.com > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.445 / Virus Database: 250 - Release Date: 1/21/2003 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php