Template:Chip Creator.php

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

?>