Narz
12-01-2002, 05:06 AM
Hi. I am super new to PHP. Just bought a book on it and am trying to learn today. I know my website is capable of running it due to the success of this test...
http://www.narcity.com/1phpTest/11testph.php
However the other programs I copied from the book (and even got the error-proof source code from) don't work. :mad:
Here's an example one...
------------------------------
<?php
__$start_num_=_1;
__$end_num_=_10;
?>
<HTML>
<HEAD>
<TITLE>A_division_table</TITLE>
</HEAD>
<BODY>
<H2>A_division_table</H2>
<TABLE_BORDER=1>
<?php
__print("<TR>");
__print("<TH>_</TH>");
__for_($count_1_=_$start_num;
_______$count_1_<=_$end_num;
_______$count_1++)
____print("<TH>$count_1</TH>");
__print("</TR>");
__for_($count_1_=_$start_num;
_______$count_1_<=_$end_num;
_______$count_1++)
__{
____print("<TR><TH>$count_1</TH>");
____for_($count_2_=_$start_num;
_________$count_2_<=_$end_num;
_________$count_2++)
______{
________$result_=_$count_1_/_$count_2;
________printf("<TD>%.3f</TD>",
_______________$result);__//_see_Chapter_9
______}
____print("</TR>\n");
__}
?>
</TABLE>
</BODY>
</HTML>
------------------------------
What is the problem here? :confused:
Here is the error messege I get : "Parse error: parse error in /home3/www/narcity/1phpTest/divis.php on line 2"
Thanks alot for your help!
:thumbsup:
By the way, if you are curious what I ideally plan to do with PHP and have any advice for me check out the page of my game (not yet in exsistance) : http://www.narcity.com/WorldConquest/WCMain.html
Thanks again!
- Narz http://www.narcity.com/ZDownloads/Smileys/king.gif
http://www.narcity.com/1phpTest/11testph.php
However the other programs I copied from the book (and even got the error-proof source code from) don't work. :mad:
Here's an example one...
------------------------------
<?php
__$start_num_=_1;
__$end_num_=_10;
?>
<HTML>
<HEAD>
<TITLE>A_division_table</TITLE>
</HEAD>
<BODY>
<H2>A_division_table</H2>
<TABLE_BORDER=1>
<?php
__print("<TR>");
__print("<TH>_</TH>");
__for_($count_1_=_$start_num;
_______$count_1_<=_$end_num;
_______$count_1++)
____print("<TH>$count_1</TH>");
__print("</TR>");
__for_($count_1_=_$start_num;
_______$count_1_<=_$end_num;
_______$count_1++)
__{
____print("<TR><TH>$count_1</TH>");
____for_($count_2_=_$start_num;
_________$count_2_<=_$end_num;
_________$count_2++)
______{
________$result_=_$count_1_/_$count_2;
________printf("<TD>%.3f</TD>",
_______________$result);__//_see_Chapter_9
______}
____print("</TR>\n");
__}
?>
</TABLE>
</BODY>
</HTML>
------------------------------
What is the problem here? :confused:
Here is the error messege I get : "Parse error: parse error in /home3/www/narcity/1phpTest/divis.php on line 2"
Thanks alot for your help!
:thumbsup:
By the way, if you are curious what I ideally plan to do with PHP and have any advice for me check out the page of my game (not yet in exsistance) : http://www.narcity.com/WorldConquest/WCMain.html
Thanks again!
- Narz http://www.narcity.com/ZDownloads/Smileys/king.gif