_only 发表于 2023-1-7 18:38:57

preg_quote()函数

preg_quote()函数

<style type = "text/css">
<!--
body,td,th {
    font-size: 12px;
}
body {
      margin-left: 10px;
        margin-top: 10px;
        margin-right: 10px;
        margin-bottom: 10px;
}
-->
</style></head>

<body>
</script>
<?php
      $str = '!、$、"、*、+、.、[、]、\\、/、b、<、>';
        $str2 = 'b';
        $match_one = preg_quote($str,$str2);
        echo $match_one;
?>


执行结果:
\!、\$、"、\*、\+、\.、\[、\]、\\、/、\b、\<、\>

nihaolai 发表于 2023-2-17 21:18:22

好好好好好好好好好好好好好好好好好顶
页: [1]
查看完整版本: preg_quote()函数