nexuslinkservices/html-tag-appendar

v1.0.0 2016-09-17 09:57 UTC

This package is not auto-updated.

Last update: 2024-05-11 17:51:00 UTC


README

Find word and append provided HTML tag around word.

Latest Version Software License Scrutinizer Code Quality Build Status

Installation

If you use composer, you can add this package by running

composer require galiteintechnologies/html-tag-appendar

Usage

<?php

use HtmlTagAppendar\StringTagAppendar;

$stringTagAppendar = new StringTagAppendar();
        
$content = "This content has some dummy text. I want to highlight dummy text with bold tag.";        

$result = $stringTagAppendar->appendAround($content, "dummy", "<b>");

Output

This content has some <b>dummy</b> text. I want to highlight <b>dummy</b> text with bold tag.

CONTRIBUTING:

Pull requests are always welcome.