CSC220 fibonacci3.php

From dftwiki3
Revision as of 19:27, 19 September 2010 by Thiebaut (talk | contribs) (Created page with '--~~~~ ---- <code><pre> <html> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <PRAGMA NO-CACHE> <head> <title>Php variables</title> <body> <div> <?php $fibN = 1; $fibN_…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut 23:27, 19 September 2010 (UTC)



<html>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<PRAGMA NO-CACHE>
<head>
<title>Php variables</title>
<body>
<div>

<?php

$fibN = 1;
$fibN_1 = 1;

print "<table border=\"1\">";
print "<tr><td> i </td><td> fib[i] </td></tr>";
for ( $count=2; $count<10; $count++ ) {
  $temp = $fibN + $fibN_1;
  $fibN_1 = $fibN;
  $fibN   = $temp;
  print "<tr><td>$count</td><td> $fibN </td></tr>";
}
print "</table>";

?>
</div>
</body>
</html>










Categoy:CSC220