nexuslinkservices / html-tag-appendar
v1.0.0
2016-09-17 09:57 UTC
Requires
- php: >=5.6.2
Requires (Dev)
- phpunit/phpunit: 5.5.*
This package is not auto-updated.
Last update: 2024-09-14 19:20:16 UTC
README
查找单词并在其周围添加提供的HTML标签。
安装
如果你使用composer,你可以通过运行以下命令添加此包:
composer require galiteintechnologies/html-tag-appendar
用法
<?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>");
输出
This content has some <b>dummy</b> text. I want to highlight <b>dummy</b> text with bold tag.
贡献
欢迎提交拉取请求。