Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread Jason Wong
On Monday 26 July 2004 05:39, Suresh Manoharan wrote:

> Good learning experience for me. Found more information in the following
> links:
>
> http://www.php.net/manual/en/language.basic-syntax.php
> http://www.php.net/manual/en/ini.sect.language-options.php#ini.short-open-t
>ag

Also manual > Appendix P. List of Parser Tokens

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
"A dirty mind is a joy forever."
-- Randy Kunkee
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread Suresh Manoharan
Thanks, Eoghan. It works.

Good learning experience for me. Found more information in the following
links:

http://www.php.net/manual/en/language.basic-syntax.php
http://www.php.net/manual/en/ini.sect.language-options.php#ini.short-open-tag

"Eoghan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> instead of that line use this
>  echo "\n"
> ?>
>
>
> > Can you pls. help me understand why parsing error occurs and how to
avoid
> > it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parsing error when XML version is mentioned

2004-07-25 Thread eoghan
instead of that line use this
\n"
?>

Can you pls. help me understand why parsing error occurs and how to avoid
it.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Parsing error

2002-04-01 Thread Steve Cayford

It looks like you've got a closing curly bracket "}" for your switch 
statement, but not for your while statement.

Also, have you read up on the switch statement? Keep in mind that if 
something matches your case 1, it will also fall through and execute 
case 2, case 3, etc... unless you include break statements. e.g. try 
this:

switch ($row)
{
   case 1:
 {
   $vignette = $data[$c];
   break;
 }
   case 2:
 {
   $photo = $data[$c];
   break;
 }
...
...
...

-Steve


On Monday, April 1, 2002, at 10:44  AM, news.php.net wrote:

> Hi,
>
> I'm real new in php and trying to read a txt file
>
> this is my code :
>
>   $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




Re: [PHP] Parsing error

2002-04-01 Thread Miguel Cruz

On Mon, 1 Apr 2002, news.php.net wrote:
>   while ($data = fgetcsv ($fp, 1000, ";"))
>   {
> switch ($row)
>  {
> }
> ?>
> 
> and when i run it i get : Parse error: parse error in essai.php on line 45

You never close the { you open for the while().

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Parsing error

2002-04-01 Thread Chris Kwasneski

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:[EMAIL PROTECTED]]
>Sent: Monday, April 01, 2002 10:45 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Parsing error
>
>
>Hi,
>
>I'm real new in php and trying to read a txt file
>
>this is my code :
>
>  $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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Parsing error

2002-04-01 Thread Rick Emery

which line is 45

-Original Message-
From: news.php.net [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 10:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing error


Hi,

I'm real new in php and trying to read a txt file

this is my code :



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