note 19242 deleted from ref.strings by didou
| From: | didou@php.net | Date: | Sun, 18 May 2003 00:50:33 +0000 |
| Subject: | note 19242 deleted from ref.strings by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48299@lists.php.net to get a copy of this message | ||
Note Submitter: albanac@gmx.de
----
I found a nice replacement vor the "swap" command, which used to swap two variables...
it even works with more than one element and I used it to change the bgcolor of a <table> each
row (makes reading more comfortable)
first you define $color:
$color= array('#0066CC', '#0099CC');
this piece of code just gives out another color, each time you call it
$tmp = $color[0];
$col = array_shift ($color);
$color[] = $tmp;