[nycphp-talk] Parse error setting an array - why?
soazine@pop.erols.com
soazine at pop.mail.rcn.net
Fri May 30 11:56:42 EDT 2003
Warning: Invalid argument supplied for foreach() in
/users/ppowell/web/profile/display.php on line 8
Lines 5-9:
// DETERMINE IF THE USER'S BROWSER HAS JAVASCRIPT BY REARRANGING THE
get_browser() OBJECT AS AN ARRAY
$browser = get_browser();
foreach ($browser as $key => $val) {
$browserArray = array($key, $val);
}
Phil
Original Message:
-----------------
From: Analysis & Solutions danielc at analysisandsolutions.com
Date: Fri, 30 May 2003 11:48:08 -0400
To: talk at nyphp.org
Subject: Re: [nycphp-talk] Parse error setting an array - why?
Phil:
On Fri, May 30, 2003 at 10:58:48AM -0400, soazine at pop.erols.com wrote:
>
> $browserArray($key) = $val;
That looks weird to me for several reasons. Perhaps you mean:
$browser = array($key => $val);
In general, in the future, copy and paste the error message, including the
file and line, then tell us which line numbers of the script you're
showing us (and make sure to import the exact script to your email, not a
retyping of it, which it looks like you may have done here.
--Dan
--
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--- Unsubscribe at http://nyphp.org/list/ ---
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
More information about the talk
mailing list