Can someone maybe tell me why this is not working?
I have used echo to build a form around the results:
echo "[$key:]$value";
echo "[$key:]<br>";
to try to capture it into a textarea so that I can submit the result to a new page, when I do this the page shows blank….
<?php
/**
* Function to read meta information from the given domain.
*
* @param string $domain
*/
// Read META info
$tags = get_meta_tags('http://www.cheap-flight.co.za');
// Check the result and display it.
if (sizeof($tags) == 0){
echo '<div>No META information was found!</div>';
}
echo '<form name="form1" method="post" action="">'
echo '<textarea name="textarea" id="textarea" cols="45" rows="5">'
foreach ($tags as $key=>$value) {
echo "[$key:]$value";
echo "[$key:]<br>";
}
echo '</textarea></form>'
?>
The ideal would be to have it like this:
echo "<textarea name="textarea" id="textarea" cols="45" rows="5">[$key:]$value</textarea>";
and place each result into it’s own textarea…
Any help would be appreciated
You are missing
;at the end of your lines. And I would put the loop in anelsestatement, otherwise it does not make sense.