this code looks correct to me:
<?php
foreach ($specificationsarray as $header => $value) {
echo "Header: $header; Value: $value<br />\n";
}
?>
What exactly is the problem you are having getting the array to show the values in a tabular form?
what is the result of the <?php print_r($specificationsarray); ?> code? This will give me some idea of the data you are working with.
Your foreach loop[ looks like it should do what you are asking about, so I guess I need clarification on what you are expecting from the foreach loop that it is not giving.