Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
pabop_e2 [2011-02-15 09:34]
Joakim Forsgren
pabop_e2 [2011-02-15 09:38]
Joakim Forsgren
Line 72: Line 72:
 Vad kommer följade program att skriva ut? Vad kommer följade program att skriva ut?
 <code php> <code php>
-  printname(string $name, int $n) { +<?php 
-    if(n<1) {+function printname($name, $n) { 
 +    if($n<1) {
       return 0;       return 0;
     }     }
-    printname(name,n-1);+    printname($name,$n-1);
     echo $name  . " n = " . $n . "\n";     echo $name  . " n = " . $n . "\n";
-  }+} 
 + 
 +printname("Joakim",3);
  
-  printname("Joakim",3); 
 </code> </code>