Difference between revisions of "Template:Chip Creator.php"

From sigrok
Jump to navigation Jump to search
(Created page with "== Chip Template Creator (PHP) == <small> <?php $NUM_PINS = 100; //SET HERE! Then lunch the code echo '{| border="0" cellspacing="0" '; for ($i=1; $i<($NUM_PINS/2 + 1); $i+...")
 
m
Line 1: Line 1:
== Chip Template Creator (PHP) ==
== Chip Template Creator (PHP) ==


<small>
<small><code>
<?php
<?php
$NUM_PINS = 100;  //SET HERE! Then lunch the code
$NUM_PINS = 100;  //SET HERE! Then lunch the code
Line 26: Line 26:


?>
?>
</small>
</code></small>

Revision as of 04:39, 15 February 2019

Chip Template Creator (PHP)

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

?>