for ($i=0; $i< count($row); $i++) { $nombrePost = "unirse".$row[$i]; if (isset($_POST[$nombrePost])) return $nombrePost; }