Re: need help with foreach()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 10 March 2003 08:10, David Rice wrote:
> Hey thank's for the ideas but  neither of them work, doh...
>
> Okay fredrik I know your idea won't work cos list only works with
> numericaly indexed arrays, both the arrays that i am using are indexed by
> date. (it produces a parse error when run)

Parse error simply means the code has a syntax error. Not necessarily that the 
idea doesn't work.

> Janet your idea i would have thought would work.... but i can't get it to,
> for some reason
>
> whenever I run the script it just gives me...
> "Warning:  Invalid argument supplied for foreach() in
> /home/filterseveuk/public_html/project/tips.php on line 56"
> Not sure as to what it is talking abotu here as far as I know, this should
> work.
>
> =====================
> foreach($tips as $key => $value){
>
>         $pointvalue[$key] = $value / $staff[$key] ;
>
>      }

What does print_r($tips) give you? While you're at it do a var_dump($tips) as 
well.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Too cool to calypso,
Too tough to tango,
Too weird to watusi
		-- The Only Ones
*/


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux