Well, I will be having something like this:
$se5f2254321s65s32s65[] will hold various valus like jan_1,jan-2,jan_3,jan_4 etc and then jan_1 will hold 1, jan_2=2,, jan_3=1 etc etc...
Depending on certain conditions, I want to increment the values of certain values in the array...like...
for($i=0; $i<=count($se5f2254321s65s32s65); $i++)
{
$se5f2254321s65s32s65[$i]["jan_1"] = 1
}
I want to increment it with 1 and so on for the various other values....
Thanx
Best Regards,
Dhaval
From: Chris Shiflett <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: Dhaval Desai <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [PHP] Multidimensional Array manipluation... Date: Thu, 2 Jan 2003 09:30:43 -0800 (PST)> >$test["0"]["hey"] = 1; > >$test["1"]["hi"] = 2; > >$test["2"]["hello"] = 3; > > I want to update $test["0"]["hey"] and set it as 1+1; If you just want to increment the value: $test["0"]["hey"]++; > Also is there any idea on how can we count() the values > in a multi dimensional arrays... The function array_count_values() might give you what you want. What are you wanting to count exactly? A good reference for you online is: http://www.php.net/manual/en/ref.array.php Chris
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php