[FX.php List] FW: Creating Dates in a loop
Gjermund Gusland Thorsen
ggt667 at gmail.com
Tue Jan 23 11:35:59 MST 2007
This will work for one task pr day, in principle, I take for granted
that there are 0 or 1 tasks pr date and that the results are sorted.
for( $i = 1; $i <= 31; $i++ ) {
if( intval( date( 'd', $value['date'][0] ) ) = intval( $i ) ) {
echo $value['date'][0] . ' ' . $value['task'][0];
} else {
echo $value['date'][0]
}
}
What I told you here is just a principle, and has plenty of
improvement potential,
I hope I gave you a kick in the right direction.
ggt667
On 1/23/07, Matt Tolman <matt.tolman at ichotelsgroup.com> wrote:
> Sorry, accidentally hit send on that email before I was finished typing it,
> here is the full email:
>
> I am still pretty new at PHP and fx.php, and I have what is hope a fairly
> basic question.
>
> I want to create a report that allows the user to make a date range and then
> return a report
>
> 1/1/2006 <data>
> 1/2/2006 <data>
> 1/3/2006 nothing scheduled
> 1/4/2006 <data>
> 1/5/2006 nothing scheduled
> ...
>
> So, in filemaker there are gaps in the dates (in the above example there
> would be no records in Filemaker for 1/3/2006 and 1/5/2006, but I would
> still like for them to display in the report. Is there a way to do this in
> a looping script that displays the dates for the gaps of missing records in
> Filemaker.
>
> Thanks for any ideas that you have.
>
> --Matt
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
More information about the FX.php_List
mailing list