View Single Post
ישן 21-03-07, 16:44   # 2
RS324
תודה על תרומתך.
 
מיני פרופיל
תאריך הצטרפות: May 2006
הודעות: 3,173

RS324 לא מחובר  

בבקשה אתה רק צריך לעבוד על ה INPUT


PHP קוד:
<?php

//some vars :)
$MAX = array();

$MAX['height'] = 0;
$MAX['weight'] = 0;

$MAX['H_userid'] = 0;
$MAX['W_userid'] = 0;

$users = array();

for (
$i 1;$i <=15 ;$i++)
{
    echo 
'<input for height><input for weight>';
    
$users[$i] = array('height' => $_POST['height'],'weight' => $_POST['weight']);
    
    if (
$users[$i]['height'] > $MAX['height'])
    {
        
$MAX['height'] = $users[$i]['height'];
        
$MAX['H_userid'] = $i;
    }
    
    if (
$users[$i]['weight'] > $MAX['weight'])
    {
        
$MAX['weight'] = $users[$i]['weight'];
        
$MAX['W_userid'] = $i;
    }
    
}


// fat user weight and height

echo 'fat weight : '.$users[$MAX['W_userid']]['weight'].'fat height :'.$users[$MAX['W_userid']]['height'];
echo 
'height weight : '.$users[$MAX['H_userid']]['weight'].'height height :'.$users[$MAX['H_userid']]['height'];


 
?>
  Reply With Quote