I am trying to send PHP array by html form by POST. The code which I am using is below:
<?php
$content = array('111', '222' );
?>
<html>
<head>
<title>PAGE TITLE</title>
</head>
<body>
<form name="downloadexcel" action="downloadexcel.php" method="post">
<input type="text" name="data" value="<?php echo $content; ?>"/>
<a href="javascript: submitform()">Download</a>
</form>
<script type="text/javascript">
function submitform()
{
document.downloadexcel.submit();
}
</script>
</body>
</html>
How can I send an PHP array by html form?
Any web link or source code would be appreciated.
json_encode/json_decode).