File: text_change_syntax.php

Recommend this page to a friend!
  Classes of Daniel Alan Guerrero Matamoros  >  Styled Texts  >  text_change_syntax.php  >  Download  
File: text_change_syntax.php
Role: Example script
Content type: text/plain
Description: Syntax and example of the class
Class: Styled Texts
Change given text strings and format as HTML
Author: By
Last change:
Date: 4 years ago
Size: 804 bytes
 

Contents

Class file image Download
<?php

require_once("text_change.php");

?>
<!DOCTYPE html>
<HTML>
<HEAD>

<TITLE>EXAPLE AND SYNTAX</TITLE>

<STYLE>

.my_css {
    background-color: red;
    color: black;
}

.n_t {
    color: blue;
}

</STYLE>

</HEAD>
<BODY>
<H1>LOL</H1>
<?php

#one time function
$t = new text_change(false, 0, true, "my_css");
$t->add_change("WARNING!");
$text = $t->print_changes("WARNING! UNEXPECTABLE VALUES IN THE CURRENT FILE");

echo
$text;

?>
<HR>
<?php

#multiples values
$m = new text_change(true, 5, true, "n_t");
$m->add_change("numeros");
$m->add_change("7");
$m->add_change("favoritos");
$m->add_change("12");
$texto = $m->print_changes("Los numeros 7 y 12 son mis favoritos entre todos los numeros que hay en el Universo.");

echo
$texto;

?>
</BODY>
</HTML>


For more information send a message to info at phpclasses dot org.