PHP Classes

File: us-to-uk-converter/index.php

Recommend this page to a friend!
  Classes of javaria razzaq   US to UK Text Converter   us-to-uk-converter/index.php   Download  
File: us-to-uk-converter/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: US to UK Text Converter
Convert English text between US and UK spellings
Author: By
Last change:
Date: 6 years ago
Size: 611 bytes
 

Contents

Class file image Download
<?php
require('AmericanBritishSpellings.php');
$american_british_spellings = new AmericanBritishSpellings('$var');
$text = "accessorise ageing aggrandisement agonise agonised agonises british to american";
$textx = "accessorize aging aggrandizement agonize agonized agonizes american to british";
$new_text = $american_british_spellings->SwapBritishSpellingsForAmericanSpellings(['text'=>$text]);
print_r($text);
echo
"<br>";
print(
$new_text);
$american = $american_british_spellings->SwapAmericanSpellingsForBritishSpellings(['text'=>$textx]);
echo
"<br>";
print_r($textx);
echo
"<br>";
print_r($american);
?>