示例:
if: $text="youtube.com/video"
我想在这段文字的末尾添加一些类似"example"的内容。
制作:
youtube.com/videoexample
有什么问题
$text .= "example";
您可能正在寻找类似ih-php:的东西
<?php
if( $text == "youtube.com/video" )
{
$text = $text . 'example';
}
?>
.
是连接其操作数字符串的串联运算符。
示例:
if: $text="youtube.com/video"
我想在这段文字的末尾添加一些类似"example"的内容。
制作:
youtube.com/videoexample
有什么问题
$text .= "example";
您可能正在寻找类似ih-php:的东西
<?php
if( $text == "youtube.com/video" )
{
$text = $text . 'example';
}
?>
.
是连接其操作数字符串的串联运算符。