PHP Classes

Styled Texts: Change given text strings and format as HTML

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 111 All time: 9,592 This week: 190Up
Version License PHP version Categories
text_style 1.8GNU General Publi...5.3PHP 5, Text processing
Description 

Author

This class can change given text strings and format as HTML.

It takes a given text string and change certain strings to a given text.

The resulting text can be formatted as HTML using certain CSS classes to highlight the changed text strings.

Picture of Daniel Alan Guerrero Matamoros
  Performance   Level  
Name: Daniel Alan Guerrero ... is available for providing paid consulting. Contact Daniel Alan Guerrero ... .
Classes: 7 packages by
Country: Mexico Mexico
Age: 28
All time rank: 197221 in Mexico Mexico
Week rank: 405 Up3 in Mexico Mexico Up
Innovation award
Innovation award
Nominee: 1x

Example

<?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>


  Files folder image Files  
File Role Description
Plain text file text_change.php Class Text change class
Accessible without login Plain text file text_change_syntax.php Example Syntax and example of the class

Downloadtext_style-2015-12-06.zip 1KB
Downloadtext_style-2015-12-06.tar.gz 1KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Emoji Convert Download .zip .tar.gz Extended class Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:111
This week:0
All time:9,592
This week:190Up