Difference between revisions of "Template:Chip Creator.php"
Martinloren (talk | contribs) m |
Martinloren (talk | contribs) |
||
Line 1: | Line 1: | ||
== Chip Template Creator (PHP) == | == Chip Template Creator (PHP) == | ||
(copy the code from the edit panel to get it right) | |||
<small><code> | <small><code> |
Latest revision as of 04:40, 15 February 2019
Chip Template Creator (PHP)
(copy the code from the edit panel to get it right)
<?php
$NUM_PINS = 100; //SET HERE! Then lunch the code
echo '{| border="0" cellspacing="0"
';
for ($i=1; $i<($NUM_PINS/2 + 1); $i++) {
if ($i==1) echo '|-
| style="width: 20em; font-weight: bold;" align="right" |
| style="width: 2em;" align="right" | 1-
| rowspan="'.($NUM_PINS/2).'" valign="top" style="width: 30em; background-color: #333333; color: white;font-weight: bold;" | O
| style="width: 2em;" | -'.($NUM_PINS+1-$i).'
| style="width: 20em; font-weight: bold;" |
';
else echo '|-
| style="width: 10em; font-weight: bold;" align="right" |
| style="width: 2em;" align="right" | '.$i.'-
| style="width: 2em;" | -'.($NUM_PINS+1-$i).'
| style="width: 10em; font-weight: bold;" |
';
}
echo '
|}';
?>