RE: [PHP] Parsing error

From: Date: Mon, 01 Apr 2002 17:37:39 +0000
Subject: RE: [PHP] Parsing error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-90981@lists.php.net to get a copy of this message
Is it just me or is the for statement missing a begining curly bracket? -Chris At 11:29 AM 4/1/2002 -0600, you wrote:
which line is 45 -----Original Message----- From: news.php.net [mailto:d2c@free.fr] Sent: Monday, April 01, 2002 10:45 AM To: php-general@lists.php.net Subject: [PHP] Parsing error Hi, I'm real new in php and trying to read a txt file this is my code : <?php $row = 1; $fp = fopen ("lecteurs.txt","r"); while ($data = fgetcsv ($fp, 1000, ";")) {
    $num = count ($data);
    $row++;
    for ($c=0; $c<$num; $c++)
    switch ($row)
     {
     case 1 :
      {
      $vignette = $data[$c];
      }
     case 2 :
{ $photo= $data[$c]; } case 3 : { $marque= $data[$c]; } case 4 : { $nom = $data[$c]; } case 5 : { $pdfproduit= $data[$c]; } case 6 : { $commprod = $data[$c]; }
    }
fclose ($fp); echo $vignette; echo $photo; echo $marque; echo $nom; echo $pdfproduit; echo $commprod; ?> and when i run it i get : Parse error: parse error in essai.php on line 45 here' my txt file (just 1 line for probe) petitimage;photo;marque;Nom;lepdf;commproduit Can someone help me to go thru TIA Hubert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#90981) next »