Mixing ordered lists, links and variables in PHP/HTML -
I'm taking a break to learn some PHP / HTML for kicks and giggles, and I have a page of simple practice met . Therefore, on my site, 'I want a list of links to the pages of each practice page, but I have decided to do it in a dynamic way because I do exercise against every hard coding. Unfortunately, that page should be included in the list!
Believing that there are files with the file "exawk # .php" on my system, "what else might be wrong with this code? Sorry, if it is sloping or horrible, then it really My first day of web programming is.
gt; Top & gt; & lt; title & gt; awakening exercise & lt; / title & gt; & Lt; / head & gt; Body & gt; & lt; h1 & gt; & quot; a href = "http://forums.digitalpoint.com/showthread.php?t=642480" & Gt; This is "awake exercise." This page is & lt; / a & gt ;. & lt; / h1 & gt; & lt; ol & gt; & lt ;? php $ arex = glob ("exawk *. Php "); // $ in AXX $ Numex = 0 is the array of matching files; $ I = 0; foreign currency ($ sx) {$ numex ++;} while ($ numex> = 0) {resonant "and gt; & Lt; A href = ". $ Arex [$ i]." & Gt; Issue # ". $ Numex" & Lt; / A & gt; & Lt; / Li> "$ $ Numex--; $ I ++;}? & Gt; & lt; / ol> & lt; / body & gt; & lt; / html & gt;
Enable display_errors
in php.ini: << Code > PHP ($ asx)
is a syntax error ( .. is missing
as the $ varname.)
From the command line, you can assign it to php- L /path/to/your/file.php
.
In addition, this sample:
// matches an array of files containing $ numex = 0; foreign currency ($ asx $ youdontdoanythingwiththis) {$ numex ++;}
can be:
$ numex = count ($ arex );
Better Thing:
while ( $ Numex & gt; = 0) {... etc ...
can be:
$ num = 1; Foreach ($ asx $$ file) {echo '
Comments
Post a Comment