Re: Starnge parse problem

From: Date: Tue, 10 Dec 2002 09:55:47 +0000
Subject: Re: Starnge parse problem
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17369@lists.php.net to get a copy of this message
Hi George, Imbalance of { - I think the first one/after the for! =dn > Hi guys, > > I am starting to build a calendar. I know that there are resources out there > but I want to learn, so I'm starting from scratch. > > I've got my thinking this far and I've hit an unexpected snag. > > When I call the page containing the following script: > > <?php > > $max = date("t"); > $dateM = date("n"); > $dateY = date("Y"); > $dateNow = date("j"); > > echo "<Table width=70% border=1>"; > > for ($x = 1; $x <= $max; $x++) { > $dayName = date ("l", mktime(0,0,0,$dateM,$x,$dateY)); > $dayNum = date ("w", mktime(0,0,0,$dateM,$x,$dateY)); > $d1 = 0; > > while ( $dayNum > $d1 ) { > if ( $d1 == 0 ){ > echo "<tr><td bgcolor=gray>&nbsp;</td>"; > } else { > echo "<td bgcolor=cornflower>&nbsp;</td>"; > } > } > > if ( $dateNow == $x && $dayNum == 0 ) { > echo "</tr><tr><td bgcolor=yellow>".$x."</td>"; > } else { > if ( $dateNow == $x && $dayNum == 6){ > echo "<td bgcolor=yellow>".$x."</td>"; > if ( $dayNum == 0 ) { > echo "</tr><tr><td bgcolor=gray>".$x."</td>"; > } else { > echo "<td bgcolor=cornflower>".$x."</td>"; > } > } > } > echo "</tr>"; > echo "</Table>"; > ?> > > > I get this error: > > "Parse error: parse error, unexpected $ in c:\inetpub\wwwroot\Month2.php on > line 48" > > Now can anyone suggest where I've gone wrong? > > Cheers > > George in Oxford > > === > > George Pitcher > HERON Technical Manager > Ingenta plc > 23-38 Hythe Bridge Street, Oxford, OX1 2ET > T +44 (0)1865 799137 direct > T +44 (0)1865 799000 switchboard > F +44 (0)1865 799134 > E george.pitcher@ingenta.com > > www.ingenta.com > Ingenta: Empowering the exchange of academic and professional content > online. > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#17369) next »