Chapter 5, Loops and Arrays

From: Date: Fri, 24 Jan 2003 15:43:38 +0000
Subject: Chapter 5, Loops and Arrays
Groups: php.windows 
Request: Send a blank email to php-windows+get-18074@lists.php.net to get a copy of this message
01232003 1706 CST 01242003 0742 CST Look at this: from the book:
    do
    {
       echo'<br><br>$Auto[$Count]";
       $CheckEmpty = "Auto[$Count]";
       $Count = $Count + 1;
    }
    while ($CheckEmpty!="");
       if ($Count == 1) echo "Not Applicable";
my attempt to change it: <?php
        $Count=0;
        echo "Your cars are:";
        do
        {
            echo"<br><br>$_GET["Auto"][$Count]";
            $CheckEmpty = "$_GET["Auto"][$Count]";
            $Count = $Count+1;
        }
        while ($CheckEmpty!="");
        if ($Count==1) echo "Not Applicable";
    ?>
How do you do a double {}?
    $_GET because of the GET call
       $_GET["Auto"] this is right, right?
    but then what with the [$Count}?
Can I do this: $_GET["Auto"[$Count]]"; How do you write an array in an array in a Global Variable place holder? That doesnt seem possible? Wade

« previous php.windows (#18074) next »