RE: [PHP] 2 errors I can not understand

2007-03-15 Thread Ford, Mike
On 14 March 2007 22:52, Richard Lynch wrote: On Wed, March 14, 2007 6:52 am, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: The = operator takes precedence, and $d is set to 0. But why? According to the manual, the modulus operator

Re: [PHP] 2 errors I can not understand

2007-03-15 Thread Myron Turner
Ford, Mike wrote: On 14 March 2007 22:52, Richard Lynch wrote: On Wed, March 14, 2007 6:52 am, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: The = operator takes precedence, and $d is set to 0. But why? According to

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Myron Turner
Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would think that would produce an error at compile time

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Tijnema !
On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Myron Turner
Robert Cummings wrote: On Wed, 2007-03-14 at 12:57 +0100, Tijnema ! wrote: On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Robert Cummings
On Wed, 2007-03-14 at 07:42 -0500, Myron Turner wrote: Robert Cummings wrote: On Wed, 2007-03-14 at 12:57 +0100, Tijnema ! wrote: On 3/14/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote:

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Jonathan Kahan
AM Subject: Re: [PHP] 2 errors I can not understand On Wed, 2007-03-14 at 06:52 -0500, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0

Re: [PHP] 2 errors I can not understand

2007-03-14 Thread Richard Lynch
On Wed, March 14, 2007 6:52 am, Myron Turner wrote: Richard Lynch wrote: On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: The = operator takes precedence, and $d is set to 0. But why? According to the manual, the modulus operator has precedence over the equals! So shouldn't this

[PHP] 2 errors I can not understand

2007-03-13 Thread Jonathan Kahan
Hi all, Please see my output below followed by the code. I have been trying for some to figure out why 1) I can not get a line feed to work in the web page that i am using to display the output as I am not running from the commad line 2) Why my loop is only executing 3 times when i want

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Tijnema !
On 3/13/07, Jonathan Kahan [EMAIL PROTECTED] wrote: Hi all, Please see my output below followed by the code. I have been trying for some to figure out why 1) I can not get a line feed to work in the web page that i am using to display the output as I am not running from the commad line Line

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jonathan Kahan
That worked in answering part 1 now i got to figure out part 2 - Original Message - From: Tijnema ! [EMAIL PROTECTED] To: Jonathan Kahan [EMAIL PROTECTED] Cc: php Lists php-general@lists.php.net Sent: Tuesday, March 13, 2007 5:55 PM Subject: Re: [PHP] 2 errors I can not understand

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Matt Carlson
: Tuesday, March 13, 2007 4:30:45 PM Subject: [PHP] 2 errors I can not understand Hi all, Please see my output below followed by the code. I have been trying for some to figure out why 1) I can not get a line feed to work in the web page that i am using to display the output as I am not running

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Matt Carlson
: Matt Carlson [EMAIL PROTECTED] To: Jonathan Kahan [EMAIL PROTECTED]; php Lists php-general@lists.php.net Sent: Tuesday, March 13, 2007 5:12:03 PM Subject: Re: [PHP] 2 errors I can not understand I think you have an issue with the line while($d$s) when it comes to the number 3. $d will NEVER

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jake McHenry
errors I can not understand That worked in answering part 1 now i got to figure out part 2 - Original Message - From: Tijnema ! [EMAIL PROTECTED] To: Jonathan Kahan [EMAIL PROTECTED] Cc: php Lists php-general@lists.php.net Sent: Tuesday, March 13, 2007 5:55 PM Subject: Re: [PHP] 2 errors

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Myron Turner
@lists.php.net Sent: Tuesday, March 13, 2007 4:30:45 PM Subject: [PHP] 2 errors I can not understand Hi all, Please see my output below followed by the code. I have been trying for some to figure out why 1) I can not get a line feed to work in the web page that i am using to display the output

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jonathan Kahan
Lists php-general@lists.php.net Sent: Tuesday, March 13, 2007 4:30:45 PM Subject: [PHP] 2 errors I can not understand Hi all, Please see my output below followed by the code. I have been trying for some to figure out why 1) I can not get a line feed to work in the web page that i am using

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Robert Cummings
On Tue, 2007-03-13 at 19:04 -0400, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would think that would produce an error at compile time since $s%$d is an

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-03-13 at 19:04 -0400, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would think that would produce an error at compile

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Robert Cummings
On Tue, 2007-03-13 at 18:46 -0700, Jim Lucas wrote: another suggestion would be to have it written this way 0 == ($s % $d) if you by chance did this 0 = ($s % $d) it will give you an error, because you cannot assign a value to a literal value. Yeah, this has flown across the list

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Jim Lucas
Robert Cummings wrote: On Tue, 2007-03-13 at 18:46 -0700, Jim Lucas wrote: another suggestion would be to have it written this way 0 == ($s % $d) if you by chance did this 0 = ($s % $d) it will give you an error, because you cannot assign a value to a literal value. Yeah, this has flown

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Richard Lynch
While the others have provided the answers for your questions, I went a little further before reading the whole thread, so here's some bonus free advice. :-) On Tue, March 13, 2007 4:30 pm, Jonathan Kahan wrote: 1) I can not get a line feed to work in the web page that i am using to display

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Richard Lynch
On Tue, March 13, 2007 6:04 pm, Jonathan Kahan wrote: This did fix the problem but I am amazed that $s%$d=0 would be interpereted as a statement assigning d to 0 since there is some other stuff in front of d... I would think that would produce an error at compile time since $s%$d is an

Re: [PHP] 2 errors I can not understand

2007-03-13 Thread Richard Lynch
On Tue, March 13, 2007 6:27 pm, Robert Cummings wrote: Moral of the story? Don't be sloppy. Take pride in writing readable code. Anyone can produce gibberish. The converse is not true. :-) IOW, some of us produce gibberish even when we are trying to write readable code. 'Course, Perl hackers