Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-12 Thread Ralph Deffke
thats why I decided years ago to write myself a little bunch of classes for the html tags which gives me the ability to have PHP only code, very nice, no errors and my outputs dont even need Tidy pure XHTML i find these idear of mixing html and php as spagetty, using divs for tables as something w

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-12 Thread tedd
At 8:33 AM -0700 8/12/09, Jim Lucas wrote: Daevid Vincent wrote: -snip- I side with Jim on this. I never use short tags and write similar crap. Jim said: I have found, in a number of cases, that using only the tag doesn't work all the time. It should work ALL the time, but sometimes inh

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-12 Thread Jim Lucas
ground color on the highest parent that it > applies to. Hey imagine that, there is a TR tag which stands for TABLE ROW > tag. Seems obvious to me. This reduces your page size in kilobytes, makes a > much cleaner HTML rendering to read in source, and is the PROPER way to do > it. > I

RE: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Daevid Vincent
makes a much cleaner HTML rendering to read in source, and is the PROPER way to do it. > > } > > > > No need to initialize $dr as by default PHP will make it a > boolean "false", > > then each itteration, it will toggle true/false and > substitute the CSS cl

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread John Butler
He's pointing out a typo... "forearch" instead of "foreach" :) LOL! I almost always miss the jokes. Thanks for the smiley face to get my (lighter) attention ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Robert Cummings
John Butler wrote: What a lot of good ideas spawned from the OP! I am learning many things,.. while also actually working (paying bills), so I regularly have to just go with what I know well. Anyway, I already have the forearch { loop (for other reasons it is necessary), and I only needed o

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread John Butler
What a lot of good ideas spawned from the OP! I am learning many things,.. while also actually working (paying bills), so I regularly have to just go with what I know well. Anyway, I already have the forearch { loop (for other reasons it is necessary), and I only needed one color to alternat

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread tedd
At 1:53 PM -0600 8/11/09, John Butler wrote: What a lot of good ideas spawned from the OP! I am learning many things,.. while also actually working (paying bills), so I regularly have to just go with what I know well. Anyway, I already have the forearch { loop (for other reasons it is necessa

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread John Butler
What a lot of good ideas spawned from the OP! I am learning many things,.. while also actually working (paying bills), so I regularly have to just go with what I know well. Anyway, I already have the forearch { loop (for other reasons it is necessary), and I only needed one color to alternat

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ben Dunlap
> # before was $styles = array( 'even', 'odd' ); >>> # after new requirements it is... >>> $styles = array( 'white', 'white', 'gray' ); >>> foreach($items as $item) >>> { >>> printf( '%s', current( $styles ), $item ); >>> >>> next( $styles ) or reset( $styles ); >>> } >>> >>> >>> +5000. I think i

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Robert Cummings
Ben Dunlap wrote: # before was $styles = array( 'even', 'odd' ); # after new requirements it is... $styles = array( 'white', 'white', 'gray' ); foreach($items as $item) { printf( '%s', current( $styles ), $item ); next( $styles ) or reset( $styles ); } +5000. I think is by far the most reada

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ben Dunlap
> # before was $styles = array( 'even', 'odd' ); > # after new requirements it is... > $styles = array( 'white', 'white', 'gray' ); > foreach($items as $item) > { > printf( '%s', current( $styles ), $item ); > > next( $styles ) or reset( $styles ); > } > > +5000. I think is by far the most readabl

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread tedd
At 10:27 AM -0300 8/11/09, Martin Scotta wrote: A change request just came in - the interaction designer wants every third line to have a grey background, instead of every second line. # before was $styles = array( 'even', 'odd' ); # after new requirements it is... $styles = array( 'white', 'whi

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread tedd
; docs and books, but can't remember (nor find now) in PHP how to say "inverse your value" (to a boolean). ? TIA! -G If I was going to do that then I would use jQuery: $(document).ready(function(){ $("table tr:even").addClass("even");; $(&quo

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Conor Mac Aoidh
r (nor find now) in PHP how to say "inverse your value" (to a boolean). ? TIA! -G If I was going to do that then I would use jQuery: $(document).ready(function(){ $("table tr:even").addClass("even");; $("table tr:odd").addClass("odd&

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Martin Scotta
I can alternate the background-color of my 's. >>> >>> $tableRowBGcolorBoolCounter != $tableRowBGcolorBoolCounter; //-boolean on >>> and off >>> >>> I am looking thru' docs and books, but can't remember (nor find now) in >>> PHP how to s

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread tedd
an on and off I am looking thru' docs and books, but can't remember (nor find now) in PHP how to say "inverse your value" (to a boolean). ? TIA! -G John: Here's my solution: http://webbytedd.com/b/color-rows/ Cheers, tedd However, my solution (after reading oth

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread tedd
; docs and books, but can't remember (nor find now) in PHP how to say "inverse your value" (to a boolean). ? TIA! -G John: Here's my solution: http://webbytedd.com/b/color-rows/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.co

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ralph Deffke
seems they changing idears on the fly? could it be that the designer is a smal ugly person while u a a good looking ladykiller ? on that background I would design a function where u can change ti what ever u want on the fly something like this var $a; function alternate( $a, $_b=array( "red", "r

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ashley Sheridan
On Tue, 2009-08-11 at 11:28 +0100, David Otton wrote: > 2009/8/11 Daevid Vincent : > > > NO! For the love of God and all that is holy, don't do that accumulator / > > mod "hack". > > That's so 1980's. And why make the CPU do all that math for every row... > > > > Just do this. It's quick and s

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread David Otton
2009/8/11 Daevid Vincent : > NO! For the love of God and all that is holy, don't do that accumulator / > mod "hack". > That's so 1980's. And why make the CPU do all that math for every row... > > Just do this. It's quick and simple: > > CSS: >        .dataRow1 { background-color: #DFDFDF; } >

RE: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-11 Thread Ford, Mike
> -Original Message- > From: Daevid Vincent [mailto:dae...@daevid.com] > Sent: 11 August 2009 02:19 > > Then YOU have more aggressive error_reporting than the default > setting > turned on. You might consider turning it down a notch. NOTICEs are > basically > useless and bloat your code IM

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Jim Lucas
sws.com] Sent: Monday, August 10, 2009 4:03 PM To: John Butler Cc: PHP-General List Subject: Re: [PHP] how to say "inverse your value" (to a boolean)? John Butler wrote: quick Q: I have this inside a foreach{} that I want to alternate between on and off so I can alternat

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Paul M Foster
On Mon, Aug 10, 2009 at 04:18:29PM -0700, Daevid Vincent wrote: > NO! For the love of God and all that is holy, don't do that accumulator / > mod "hack". > That's so 1980's. And why make the CPU do all that math for every row... > > Just do this. It's quick and simple: > > CSS: > .data

RE: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Daevid Vincent
7;" Now they have two problems. > -Original Message- > From: Martin Scotta [mailto:martinsco...@gmail.com] > Sent: Monday, August 10, 2009 5:39 PM > To: Daevid Vincent > Cc: PHP-General List > Subject: Re: [PHP] how to say "inverse your value" (to a boolean)? > &g

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Martin Scotta
; > -Original Message- > > From: Jim Lucas [mailto:li...@cmsws.com] > > Sent: Monday, August 10, 2009 4:03 PM > > To: John Butler > > Cc: PHP-General List > > Subject: Re: [PHP] how to say "inverse your value" (to a boolean)? > > > > John

RE: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Daevid Vincent
.dataRow2 { background-color: #FF; } foreach ($foo_array as $foo) { ?>"> -Original Message- > From: Jim Lucas [mailto:li...@cmsws.com] > Sent: Monday, August 10, 2009 4:03 PM > To: John Butler > Cc: PHP-General List > Subject: Re: [PHP] how to say &qu

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Jim Lucas
ru' docs and books, but can't remember (nor find now) in > PHP how to say "inverse your value" (to a boolean). > ? > > TIA! -G > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread Martin Scotta
nside a foreach{} that I want to alternate between on and off > so I can alternate the background-color of my 's. > > $tableRowBGcolorBoolCounter != $tableRowBGcolorBoolCounter; //-boolean on > and off > > I am looking thru' docs and books, but can't remember (n

[PHP] how to say "inverse your value" (to a boolean)?

2009-08-10 Thread John Butler
r (nor find now) in PHP how to say "inverse your value" (to a boolean). ? TIA! -G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php