I am having a problem to receive array data from select option. Please see code below
Here is my html file
<?php
$data = array(
"id" => "1",
"name" => "John"
);
?>
<select name="member">
<option value="`<?php echo $data; ?>`">John</option>
</select>
And here is my php file
$val = $_POST["member"];
echo $val["id"];
$at the beginning of your statement. var_dump is a function, not a variable.$val = $_POST['member']is going to be a string, not an array. So$val['id']will fail.