|
|
|
| <?
$sword = preg_split('/\W+/', stripslashes(@$_GET['word']));
$tmp = $content;
foreach ( $sword as $word ) {
$except = preg_quote('<span style="background-color: red;">'.$word.'</span>');
if(preg_match_all("/[>|\s*](.*[^<])(".$word.")(.*[^<])/",$tmp,$matches,PREG_SET_ORDER))
{
foreach($matches as $match) {
$out2 = str_replace($word,'<span style="background-color: red;">'.$word.'</span>',$match[0]);
$tmp = str_replace($match[0],$out2,$tmp);
}
}
}
$content = $tmp;
?> | | |
|
| Tag content retrieval from websites with preg_match Categories : PHP, Regexps, Arrays, HTML and PHP | | | Form input return conformance Categories : HTML and PHP, PHP, Regexps | | | php table decoder used to convert an html table to individual tokens
through regular expressions Categories : PHP, Regexps, HTML and PHP | | | How to use regular expressions to get the list of links from an HTML page Categories : PHP, Regexps, HTML, HTML and PHP | | | Parse html (title :: meta) Categories : PHP, HTML and PHP, Regexps | | | PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use! Categories : HTML and PHP, Email, PHP, Perl, HTML and PHP | | | a function that builds an HTML select list from any mysql table. Categories : PHP, MySQL, HTML and PHP | | | Message of the Day - Random Message (Needs MySQL!) Categories : Databases, HTML and PHP, PHP, MySQL | | | Alternating background color for HTML table rows Categories : PHP, Databases, MySQL, HTML and PHP | | | Constantly refresh your PHP/HTML page data. Categories : PHP, HTML and PHP, Sybase | | | Check parameters validity. Paranoia was designed to check the validity of the parameters that a php page will receive after a form submission. It can be used to check the variables sent by POST or GET Categories : Algorithms, HTML and PHP, PHP, Variables | | | background music script for random notes in a frame Categories : PHP, Content Management, HTML and PHP | | | A very simple way to build and do a hierarchical html categories browser without javascript , just using html php and mySql
Categories : HTML and PHP, Databases, Algorithms, PHP, MySQL | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | PhpView 0.1 - simple php viewer, using temporary files and frames.
Categories : PHP, PHP Options and Info, Debugging, HTML and PHP | |
|
|
|