To get the values of the form and displayed in array format.
PHP code:
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$a=explode(" ",$name);
$b=explode(" ",$email);
$combined = array_merge($a, $b);
print_r($combined);
}
In this code the output as like this:
Array ( [0] => rag [1] => raj )
But I have the output like this form name as the index:
Array ( [name] => rag [email] => raj )