PHP Classes
elePHPant
Icontem

File: sample

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alex Corretge  >  Calc Hondt  >  sample  >  Download  
File: sample
Role: Example script
Content type: text/plain
Description: Sample to use Hondt Law Class
Class: Calc Hondt
Calculate Hondt law coeficients
Author: By
Last change:
Date: 7 years ago
Size: 378 bytes
 

Contents

Class file image Download
<?php
header
('Content-Type: text/html; charset=utf-8');
require_once(
'hondt.php');
echo
"<pre>";

echo
"<h1>Càlcul de la llei d'Hondt</h1>";

$vots = Array('CiU' => 20000, 'PSC' => 23000, 'ERC' => 18000, 'IV' => '5000', 'PP' => 3000);
echo
"<h3>Relació de vots</h3>";
var_dump($vots);

echo
"<h3>Resultats</h3>";
$escons = new calcHondt(5, $vots);
echo
$escons->Render();


?>