|
Posted by Carramba on 06/15/05 13:25
On Wed, 15 Jun 2005 12:11:53 +0200, <Bsedigh_79@yahoo.com> wrote:
> hi everybody.
>
> I'am a C# programmer and for one of my applications i searched web for
> a piece of code and finally i found it but in PHP.
> it was easy to understand the logic but i still have a problem with it.
> There is single line of code that i can't understand.Would u please
> help me and explain what is going on?
>
> Code :
> 1)
> for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 &&
> $leap); $i++)
its simple for loop...
for //starting loop
($i = 0; //initiating count variable
($g_day_no) >= ( $g_days_in_month[$i] + ($i == 1 &&> $leap)); //just
condition I addet () so maybe you se better
can be more explained firts variable in condition $g_day_no
if $g_day_no bigger or equal to ( $g_days_in_month[$i] + ($i == 1 &&>
$leap))
second variable in condition ( $g_days_in_month[$i] + ($i == 1 &&>
$leap)), this one depends on i with will drow until the enequality returns
true
$i++) //grow by 1
I'am guesing you forgot brakets? {}
n that case the above code ll by executet while enequality is false
> $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);
>
> $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap) :-/
> 2)
> what is div statement?
> There is a line of code like this:
>
> $gy += 4*div($g_day_no, 1461);
>
> what is div for?
I think that is some local funktion, you should check for that
> i searched in PHP functions but i did not find anything.
> Thanks for ur appreciates.
> Behzad
>
--
Thanx in advance
________________________
BTW. I know my english is not best in the word, so please stop bugging me
about my spelling. And yes Iam sorry you don't understand what I mean, but
there is no point to yell at me. Have a nice day.
[Back to original message]
|