• Register
  • Login
  • IRC

Dark Negative Anti-Social - 2006-2016

Thank you for everything!

Author Topic: PHP Error ...  (Read 4500 times)

0 Members and 1 Guest are viewing this topic.

Abdula001

  • Guest
    • Achievements
PHP Error ...
« 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.
« Last Edit: April 26, 2013, 18:28:25 by Ryz »

  • Ryz

    • Posts: 539
      • View Profile
      • iRyz360 (Ryan) - DeviantArt
      • Achievements
    • *
    Re: PHP Error ...
    « Reply #1 on: August 02, 2012, 22:32:18 »
    GIYF

  • XGamer

    • Posts: 153
    • ( .Y. )
      • View Profile
      • Achievements
    • *
    Re: PHP Error ...
    « Reply #2 on: August 03, 2012, 00:59:12 »
    if ($mx = func_get_arg($i))

  • Gudio

    Re: PHP Error ...
    « Reply #3 on: August 03, 2012, 12:59:57 »
    What is PHP?

    Baldachyn

    • Guest
      • Achievements
    Re: PHP Error ...
    « Reply #4 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 )