zoukankan      html  css  js  c++  java
  • 字符串截取指定下标的内容

             <?php
                                                                mb_internal_encoding("utf-8");
                                                                $pp = "";
                                                                foreach ($doc as $key => $value) {

                                                                    if (mb_strpos($value, $_GET["q"])) {
                            //关键代码
                                                                        $pp = $key . ":" . $search->highlight(mb_substr($value, mb_strpos($value, $_GET["q"]), 100)) . '...';
                                                                        echo $pp;
                                                                        break;
                                                                    }
                                                                }
                                                               
                                                                ?>

  • 相关阅读:
    Study Plan The TwentySecond Day
    Study Plan The Nineteenth Day
    Study Plan The TwentySeventh Day
    Study Plan The Twentieth Day
    Study Plan The TwentyFirst Day
    python实现进程的三种方式及其区别
    yum makecache
    JSONPath 表达式的使用
    oracle执行cmd的实现方法
    php daodb插入、更新与删除数据
  • 原文地址:https://www.cnblogs.com/sheapchen/p/3010130.html
Copyright © 2011-2022 走看看