Re: Function expects string but receiving array Warming??
| From: | Chris Wesley | Date: | Tue, 03 Sep 2002 09:05:03 +0000 |
| Subject: | Re: Function expects string but receiving array Warming?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-114993@lists.php.net to get a copy of this message | ||
On Tue, 3 Sep 2002, Jean-Christian Imbeault wrote:
> Warning: header() expects parameter 1 to be string, array given in
> /www/htdocs/jc/administration/edit_products/show_products.php on line 96
>
> 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"));
header() is a PHP function. You're calling it with an invalid arguement.
(I think you're just calling the function you want by the wrong name, tho.)
> function header_row($aH) {
Try calling header_row(), instead of header(), with your array argument,
since it seems that you already have the proper function defined.
g.luck,
~Chris