如何插入文本并在该用户的末尾添加一组字符';s文本


How do I pull in text and add a set of characters to the end of that user's text?

示例:

if: $text="youtube.com/video"

我想在这段文字的末尾添加一些类似"example"的内容。

制作:

youtube.com/videoexample

有什么问题

$text .= "example";

您可能正在寻找类似ih-php:的东西

<?php
if( $text == "youtube.com/video" )
{
    $text = $text . 'example';
}
?>

.是连接其操作数字符串的串联运算符。