Dark Negative Anti-Social

Archive (Read Only) => Archive (2012-2015) => DnA Archive => 2012 => Topic started by: Abdula001 on August 02, 2012, 22:20:43

Title: PHP Error ...
Post by: Abdula001 on August 02, 2012, 22:20:43
<?php

function mittel()
{
$anz = func_num_args();
$sum = 0;
for ($i=0;$i<$anz;$i++)
   {
   
      $sum = $sum + func_get_arg($i);
      
   }
$mit = $sum / $anz;
echo $mit;
}     
?>


 <?php

include "Mittelwert.inc.php";

mittel(6,3,5,2,5);

function maximum()
{
$num = func_num_args();
echo "Es sind ". "$num"." Variablen.";
$mx = 0;
for ($i=0;$i<$num;$i++);
   {
   if ($mx < func_get_arg($i))
         $mx = func_get_arg($i);
         echo $mx;
         
   }


}

echo maximum(1,2,3);


?>
 
It say as error  Warning: func_get_arg(): Argument 3 not passed to function in blablabla.php on line 23()

I want to know how i can use if in for a thing like if its possible or anothrr code as solution for my problem.
Title: Re: PHP Error ...
Post by: Ryz on August 02, 2012, 22:32:18
GIYF
Title: Re: PHP Error ...
Post by: XGamer on August 03, 2012, 00:59:12
if ($mx = func_get_arg($i))
Title: Re: PHP Error ...
Post by: Gudio on August 03, 2012, 12:59:57
What is PHP?
Title: Re: PHP Error ...
Post by: Baldachyn on August 03, 2012, 13:59:50
What is PHP?

I had to come with true when he asked me about advices gudio and you werent around :( Im no more pro, its all up to you now :D

( We have to find another target of our jokes )