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  [EMAIL PROTECTED]
>
> 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
>
>


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

Reply via email to