oh yea you just reminded me i got a problem i cant figure out
Code:
<?PHP
//initial values
$student_count = 0;
$f_count = 0;
$m_count = 0;

//***************INPUT*********************
print "\nPlease enter your name:  ";
$f_name = trim(fgets(STDIN));
while($f_name !="STOP")
    {
      //get all required data
      $student_count++;
      $f_count++;
      $m_count++;
      
      print "\nPlease enter your gender(m or f):  ";
      $gender = trim(fgets(STDIN));
      print "\nPlease enter your age:  ";
      $age = trim(fgets(STDIN));
      
      if($gender == f)
      {
      $gender = $f_count;
      }    
        else
        {
        $gender = $m_count;
        }
    
    print "\nPlease enter your name:  ";
    $f_name = trim(fgets(STDIN));

    }


print "The number of students $student_count";
print "\nThe number of male students $m_count";
print "\nThe number of female students $f_count";



?>
i need to figure out how to make male and female counts go up respectively, does anyone have a solution with using the same syntax?