The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Simple array question, please help
gage
post Apr 26 2012, 12:09 PM
Post #1





Group: Members
Posts: 2
Joined: 26-April 12
Member No.: 16,992



$date[0]=26-4-2012; $donators[0]=1;
$date[1]=26-4-2012; $donators[1]=0;
$date[2]=26-4-2012; $donators[2]=1;
$date[3]=25-4-2012; $donators[3]=1;
$date[4]=25-4-2012; $donators[4]=0;
$date[5]=24-4-2012; $donators[5]=1;


Lets say arrays above are conected and $date[0] is showing the date when $donators[0] got 1 donator. I want you to make a code that will conmibe them this way.

$total['26-4-2012']=2;
$total['25-4-2012']=1;
$total['24-4-2012']=1;


how would i combine these things together to make for example

$date[0]=26-4-2012; $donators[0]=3
$date[1]=25-4-2012; $donators[1]=2
$date[2]=24-4-2012; $donators[2]=1
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 26 2012, 12:44 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



In what way is this related to web site functionality?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
gage
post Apr 26 2012, 01:26 PM
Post #3





Group: Members
Posts: 2
Joined: 26-April 12
Member No.: 16,992



can u help? im new here...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 26 2012, 01:32 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



What language is this? What class is it for?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:49 AM