PHP Classes

File: exemplo.php

Recommend this page to a friend!
  Classes of Romeu Gamelas   Extenso PT   exemplo.php   Download  
File: exemplo.php
Role: Example script
Content type: text/plain
Description: Exemplo de uso
Class: Extenso PT
Spell Euro currency amounts in Portuguese
Author: By
Last change:
Date: 8 years ago
Size: 784 bytes
 

Contents

Class file image Download
<?php
if(isset($_POST['v'])){
    require(
"extenso-pt.php");
   
$extenso = new extenso();
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>Teste para a classe de extenso</title>
    </head>
    <body>
<form method="post" action="test.php">
<input type="text" name="v" value="<?php echo isset($_POST['v']) ? $_POST['v'] : '';?>" />
<input type="submit" value="Extenso" />
</form>
<?php
   
if(isset($extenso)){
?>
<p><?php echo $extenso->calcular_extenso($_POST['v']);?></p>
  <p><?php echo mb_strtoupper($extenso->calcular_extenso($_POST['v']), "UTF-8");?></p>
  <p><?php echo ucwords($extenso->calcular_extenso($_POST['v']));?></p>
<?php
   
}
?>
</body>
</html>