Template:Chip Creator.php

From sigrok
Revision as of 05:40, 15 February 2019 by Martinloren (talk | contribs) (→‎Chip Template Creator (PHP))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 ' |}';

?>