Jump to content

Difference between 2 dim arrays ?


osh_php

Recommended Posts

hi there,

can anyone help me to sort it out...i want to correct maroon color lines..

 

 

 

$mindate=$FirstDOW[$mindatesave][$FirstDayOfWeek];

 

//IITDebug::write("debug",mindatesave&" is mindatesave versus maxdatesave is"&maxdatesave&"<BR>");  //FIXME debug

//IITDebug::write("debug",mindate&" is mindate versus maxdate is"&maxdate);  //FIXME debug

 

 

 

//exit();

 

$mindateuse=$mindate;

$maxdate=$maxdatesave;

 

$minweek=0;

$maxweek=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($maxdate))[$FirstDayOfWeek];[/color]// IITDebug::write("debug","**mindate is set at: "&mindate&">");  //FIXME debug

// IITDebug::write("debug","maxweek is set at: "&maxweek&">");  //FIXME debug

for ($i=0; $i<=count($arr_cereal); $i++)

{

  $arr_cereal[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_cereal[1][$i]))[$FirstDayOfWeek);

}

for ($i=0; $i<=count($arr_fruit); $i++)

{

$arr_fruit[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_fruit[1][$i]))[$FirstDayOfWeek];

}

for ($i=0; $i<=count($arr_veg); $i++)

{

  $arr_veg[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_veg[1][$i]))[$FirstDayOfWeek];

}

for ($i=0; $i<=count($arr_milk); $i++)

{

$arr_milk[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_milk[1][$i]))[$FirstDayOfWeek];

}

for ($i=0; $i<=count($arr_meat); $i++)

{

  $arr_meat[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_meat[1][$i]))[$FirstDayOfWeek];

}

for ($i=0; $i<=count($arr_extra); $i++)

{

$arr_extra[2][$i]=IIT::datediff("ww",IIT::strtotime($mindate),IIT::strtotime($arr_extra[1][$i]))[$FirstDayOfWeek];

}

$MinCereal=FetchSystemDefaults("MinCereal".$FetchStr);

$MinFruit=FetchSystemDefaults("MinFruit".$FetchStr);

 

 

 

ASP CODE---------------------->

 

 

mindateuse=mindate

maxdate=maxdatesave

 

minweek=0

maxweek=datediff("ww", mindate, maxdate, FirstDayOfWeek)

' response.write("**mindate is set at: "&mindate&">")

' response.write("maxweek is set at: "&maxweek&">")

for i=0 to ubound(arr_cereal,2)

arr_cereal(2,i)=datediff("ww", mindate, arr_cereal(1,i), FirstDayOfWeek)

next

for i=0 to ubound(arr_fruit,2)

arr_fruit(2,i)=datediff("ww", mindate, arr_fruit(1,i), FirstDayOfWeek)

next

for i=0 to ubound(arr_veg,2)

arr_veg(2,i)=datediff("ww", mindate, arr_veg(1,i), FirstDayOfWeek)

next

for i=0 to ubound(arr_milk,2)

arr_milk(2,i)=datediff("ww", mindate, arr_milk(1,i), FirstDayOfWeek)

next

for i=0 to ubound(arr_meat,2)

arr_meat(2,i)=datediff("ww", mindate, arr_meat(1,i), FirstDayOfWeek)

next

for i=0 to ubound(arr_extra,2)

arr_extra(2,i)=datediff("ww", mindate, arr_extra(1,i), FirstDayOfWeek)

next

Link to comment
https://forums.phpfreaks.com/topic/56129-difference-between-2-dim-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.