PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
  Classes of german gomez bajo  >  Mentions  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: here's an example
Class: Mentions
Highlight names mentioned in a text
Author: By
Last change:
Date: 5 years ago
Size: 449 bytes
 

Contents

Class file image Download
<?php
   
require_once("mentions.class.php");
   
$mentions = new mentions;
   
   
/*
     * At first, we fill add some names
     * */
   
$mentions->add_name("Angelina");
   
$mentions->add_name("Bob_Marley");
   
$mentions->add_name("mr_marx");
   
$mentions->add_name("Joseph");
   
/*
    ------------------------------------
    */
   
$mentions->process_text("Hello, @Angelina, I'm @Bob_Marley. How about a coffe with @mr_marx at the Bar? Maybe my son @Joseph");
?>