I get the following warning which makes no sense to me.

Warning: header() expects parameter 1 to be string, array given in 
/www/htdocs/jc/administration/edit_products/show_products.php on line 96

It's true that I am passing at an array to the function, but what I 
don't understand is why the function expects a string?

How does any function know the type of an incoming var in PHP anyway?

How can I fix my code to get rid of this error (while keeping the var as 
an array)?My code looks like this:

header(array("ID","Name","Maker's Code","Maker Name","Label 
Name","Product Type"));

function header_row($aH) {
   echo "  <TR>";
   foreach ($aH as $h) {
?>
     <TH>
       <?php echo $h; ?>
     </TH>
<?php
   }
   echo "  </TR>";
}


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to