Web hosting ratings - $table .= ; $table .= Alias ; $table .=

$table .=
; $table .= Alias ; $table .= ; $table .= Name Alignment Powers

; $table .= Enemies

; Next, you alternate the background colors of the table, to make it a little easier to read. // build each table row $bg = ; while ($row = mysql_fetch_array($result)) { $bg = ($bg== F2F2FF ? E2E2F2 : F2F2FF ); Remember the power and enemy arrays you built earlier? You use the character s ID to grab the list of values and put them into a variable to be inserted shortly into the appropriate table cell. $pow = ($powers[$row[ id ]]== ? none :$powers[$row[ id ]]); if (!isset($enemies) || ($enemies[$row[ id ]]== )) { $ene = none ; } else { $ene = $enemies[$row[ id ]]; } The table is built, row by row, inserting the appropriate data in each cell; then it s closed: $table .=
. . $row[ alias ]. . $row[ name ] . . $row[ align ] . . $pow .

.
. $ene .

; } $table .=

; Just for kicks, and to make them more visible, the script changes the color of the good and evil values in the table. This isn t necessary, but it makes the values pop out more. $table = str_replace( evil , evil , $table); $table = str_replace( good , good , $table); This variable contains either the

tag you created earlier or the table of character data. It s inserted in the page here. echo $table; 319 Building Databases
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply