How to compare arrays?

1

I'm having trouble asking this question:

Make a program that takes ten ages, weights and heights and that calculates and shows:

  • The number of people weighing more than 90 kilos and a height of less than 1,50;

  • The percentage of people between the ages of 10 and 30 among people who measure more than 1.90;

I created three input's to receive the information (age, weight and height). In PHP they are inserted into an array through the explode, but I can not relate the weight and height arrays to respond to the first point nor relate the arrays of age and height to answer the second point.

Code I have so far:

<form action="" method="post">

    <label for="idade">Idade</label>
    <input type="text" name="idade">

    <label for="peso">Peso</label>
    <input type="text" name="peso">

    <label for="altura">Altura</label>
    <input type="text" name="altura">


    <input type="submit" name="enviar">
</form>

<?php

if(isset($_POST['enviar'])){

$cont = 0;
$soma = 0;
$media = 0;

$idades = explode(",", $_POST['idade']);
$pesos = explode(",", $_POST['peso']);
$alturas = explode(",", $_POST['altura']);

?>
    
asked by anonymous 28.09.2018 / 11:39