A neat trick I use in PHP is a toggle variable, usually when I’m creating tables and want to alternate the styles.
To use a toggle variable:
<code>#Create the variable $toggle=true; #Switch it $toggle=(!$toggle);</code>
Simple!
A neat trick I use in PHP is a toggle variable, usually when I’m creating tables and want to alternate the styles.
To use a toggle variable:
<code>#Create the variable $toggle=true; #Switch it $toggle=(!$toggle);</code>
Simple!