Received: from intergate.rccd.cc.ca.us (intergate.rccd.cc.ca.us [204.69.0.2]) by postgresql.org (Postfix) with ESMTP id 18CA1475968 for ; Thu, 25 Apr 2002 11:56:15 -0400 (EDT) Received: from ismv.rccd.cc.ca.us ([207.233.113.7]) by intergate.rccd.cc.ca.us (8.9.1a/8.9.1) with ESMTP id IAA16339 for ; Thu, 25 Apr 2002 08:56:14 -0700 (PDT) Message-Id: <5.1.0.14.0.20020425085709.00aba940@mail.rccd.cc.ca.us> X-Sender: jcuz@mail.rccd.cc.ca.us X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 25 Apr 2002 08:57:31 -0700 To: pgsql-php@postgresql.org From: "Julio Cuz, Jr." Subject: Variables In-Reply-To: <5.1.0.14.0.20020315084826.02525470@cooee.cybersydney.com.a u> References: <200203130916.g2D9GLfd020708@artemis.cuci.nl> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_77585612==_.ALT" X-Archive-Number: 200204/89 X-Sequence-Number: 1113 --=====================_77585612==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed HI-- * I have the following variables: $c1 thru $c10. * I also have a FOR loop like this: for($count = 0; $count < sizeof($artist); $count++) { echo "$artist[$count]
"; } // $artist is a list of ten (10) artist's names. * What I'm trying to do is something like this: Combine the variables with the info inside the FOR loop: > for($count = 0; $count < sizeof($artist); $count++) > { //Trying to assign the value of $c1, $c2, $c3, > etc. using the value of the variable $count. > //But so far, it only processes the value of > $count alone, and it ignores $c > //The line below should read like this: $c1 = > $artist[0], next line: $c2 = $artist[1], etc. > $c . $count+1 = $artist[$count]; > } > > Help!!! Julio Cuz, Jr. Riverside Community College jcuz@rccd.cc.ca.us --=====================_77585612==_.ALT Content-Type: text/html; charset="us-ascii" HI--
  • I have the following variables: $c1 thru $c10.
  • I also have a FOR loop like this:
        for($count = 0; $count < sizeof($artist); $count++)
                { echo "<i>$artist[$count]</i><br>"; }
        // $artist is a list of ten (10) artist's names.
  • What I'm trying to do is something like this:  Combine the variables with the info inside the FOR loop:
        for($count = 0; $count < sizeof($artist); $count++)
                {  //Trying to assign the value of $c1, $c2, $c3, etc. using the value of the variable $count.
                   //But so far, it only processes the value of $count alone, and it ignores $c
                //The line below should read like this:  $c1 = $artist[0], next line:  $c2 = $artist[1], etc.
                        $c . $count+1 = $artist[$count];
                }

Help!!!

Julio Cuz, Jr.
Riverside Community College
jcuz@rccd.cc.ca.us
--=====================_77585612==_.ALT--