eg-259:lecture16
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eg-259:lecture16 [2012/03/13 19:55] – [First PHP Example] eechris | eg-259:lecture16 [2013/03/08 18:03] (current) – [Introduction to PHP (Part 1)] eechris | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Introduction to PHP (Part 1) ====== | ====== Introduction to PHP (Part 1) ====== | ||
- | **Contact Hour 19**: To be discussed | + | **Supplementary Material** |
+ | |||
+ | Provided for Reference. This material is no longer taught | ||
**Lecturer**: | **Lecturer**: | ||
Line 368: | Line 370: | ||
* Code: | * Code: | ||
<code php> | <code php> | ||
- | <?php echo("<? | + | < |
- | < | + | |
- | " | + | |
<!-- powers.php | <!-- powers.php | ||
An example to illustrate loops and arithmetic | An example to illustrate loops and arithmetic | ||
| | ||
- | < | + | <html lang=" |
- | < | + | < |
+ | <meta charset=" | ||
+ | | ||
</ | </ | ||
< | < | ||
Line 401: | Line 403: | ||
</ | </ | ||
</ | </ | ||
- | </ | + | </ |
</ | </ | ||
Line 433: | Line 436: | ||
---- | ---- | ||
- | < | + | < |
this is not necessarily a good idea! Notice how the end brace for the conditional is separated from the loop body by several unrelated HTML tags. This produces fragile code -- if the second set of PHP tags where removed, a syntax error would occur which might be difficult to track down. | this is not necessarily a good idea! Notice how the end brace for the conditional is separated from the loop body by several unrelated HTML tags. This produces fragile code -- if the second set of PHP tags where removed, a syntax error would occur which might be difficult to track down. | ||
- | </code> | + | </note> |
eg-259/lecture16.1331668539.txt.gz · Last modified: 2012/03/13 19:55 by eechris