<Martian Wabbit Productions>

Simple factorial function

June 8th, 2009 by Seich

Well, today my sister was working doing her homework and, she kind of got stressed with it, so she called me and, I ended up making it for her… I learned what a factorial is and, made this nice little function that finds the factorial of any number you pass to it. It was supposed to be written in labview, but I don’t really know what that is… so I used php xD It worked like a charm in labview according to my sister. so you can also use it in labview I guess :O

1
2
3
4
5
6
7
8
9
<?php
function factorial($input){
  $output = 1;
  for($x = $input; $x >= 1; $x--){
    $output *= $x;
  }
  return($output);
}
?>

I made an example of this function’s usage using JavaScript, check it out here

Basic of $_GET variables (PHP)

June 6th, 2009 by Seich

Hello everyone, today I am posting a tutorial on the basic usage of the $_GET super variable in php. This tutorial was originally posted at the MWPS community forums, which almost never is read so I figured that this would be a better place for it to be. It goes through the basics of the $_GET variable and some basic usage examples.
(more…)

  • Archive

  • Tags

    COmposing factorial Feed Feedburner font function Hello loop Music Noctorious PHP Script Tutorial type Updates
  • Downloads

  • Random Ads