Convert Hashtag into link in OOP way.
- how to use code example.
- index.php
- display hashtag link by using GET mehtod.
- dispaly-hastag.php
- main file to convert hashtag into link.
- src/convert-into-link.php
clone or download source files into your project.
require and use "src/convert-into-link.php" as below example:
//require source file
require_once("src/convert-into-link.php");
//type the string you can use get and post method here
$string = "It is #example string you can #test #more.";
// create object
$ConvertHashtags = new ConvertIntoLink;
// call the function in classs
$result = $ConvertHashtags -> Convert($string);
// print result
echo $result;
Orginal Creator : Sir Adam Khoury (PHP Teacher)
Original Project : http://www.developphp.com/video/PHP/Hashtag-System-and-Regex-PHP-Programming-Tutorial
GNU General Public License V. 3.0 or later