I have four variables these variables are textfields.
I want to output the one with the highest value and display its value and display its name.
<?php
$a = array($_SESSION['musicM'], $_SESSION['preach'],$_SESSION['techno'],$_SESSION['profess']);
$value = min($a);
$name = $_POST['$value'];
print_r ($value);
print_r($name);
?>
this might help you
$a = array($_SESSION['musicM'], $_SESSION['preach'],$_SESSION['techno'],$_SESSION['profess']);
$value = max($a);
and get the corresponding key
$key = array_search($value, $array);