Re: strange

From: Date: Tue, 19 Dec 2000 01:00:48 +0000
Subject: Re: strange
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30972@lists.php.net to get a copy of this message
Yeah, I modified my scripts for that, which a couple people suggested... and all was swell...
I thank everyone for the help...          ;')
- Bill At 01:33 PM 12/18/2000 -0600, W.D. wrote:
yes looks like a typo with "1" within a "....." probably would work with '1' ----- Original Message ----- From: "Bill Brennick" <bill@brennick.com> To: <php-general@lists.php.net> Sent: Monday, December 18, 2000 1:26 PM Subject: [PHP] strange Hi all, I'm trying this test script I got out of a SAMS book, and found something strange which isn't consistent with the book. First off, I'm using SuSE-7, with Apache 1.3.14, and the newest PHP4... Here's the (character-for-character) script in the book: (It's to create a simple multiplication table...) <?php
         print "<TABLE BORDER="1">\n";
         for ( $y=1' $y=<=12; $y++ )
         {
         print "<TR>\n";
                 for ( $x=1; $x<=12; $x++ )
                         {
                         print "\t<TD>";
                         print ($x*$y);
                         print "</TD>\n";
                         }
                 print "</TR>\n";
                 }
         print "</TABLE>";
?> When I run this script, I get this error: "Parse error: parse error in /home/bbrennick/public_html/php/nineteenth.php on line 2" Here is the modification I did to the script: <?php
         print "<table border=1>\n";
         for ( $y=1; $y<=12; $y++ )
         {
         print "<TR>\n";
                 for ( $x=1; $x<=12; $x++ )
                         {
                         print "\t<TD>";
                         print ($x*$y);
                         print "</TD>\n";
                         }
                 print "</TR>\n";
                 }
         print "</TABLE>";
?> Once I did that, with line 2, it works fine... My question is: Is that a 'typo' in the book? or is there something freaky going on with my web-server? (apache/php4/etc...) Thanks... - B _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com


« previous php.general (#30972) next »