Accessing and collecting post[] data from an array in PHP

Using iteration to output the required input boxes would reduce OP’s repetition. Though you need to switch your two square brackets around in order to get the same POST data format as in the original post. I’d also advise against quoting keys in HTML, because when dealing with this data in the $_POST array, you must also remember to put quotes onto the array keys (since it’s part of their name):

$_POST['\'subject\'']
// or
$_POST["'subject'"]

That also reduces legibility and is just a pain in general to handle.