douxun7992 2013-08-26 07:08
浏览 30
已采纳

php字符串函数不起作用

I am trying to use string function but these functions are not working in my program.

I am using following function.

echo strpos("set","namesetname");
echo strstr("set","namesetname");
echo stristr("set","namesetname");
echo strchr("set","namesetname");

all these functions are not displaying any things, nothing is returns or displayed on screen.

  • 写回答

2条回答 默认 最新

  • drza10046 2013-08-26 07:16
    关注

    strpos, strstr, stristr and strchr

    You used wrong syntax. Change params places reverse

    echo strpos("namesetname", "set");
    echo strstr("namesetname", "set");
    echo stristr("namesetname", "set");
    echo strchr("namesetname", "set");
    

    strpos

    strpos returns BOOLEAN or position.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 ESP32怎么烧录自启动程序
  • ¥50 html2canvas超出滚动条不显示
  • ¥15 MATLAB四叉树处理长方形tif文件
  • ¥15 java业务性能问题求解(sql,业务设计相关)
  • ¥15 52810 尾椎c三个a 写蓝牙地址
  • ¥15 elmos524.33 eeprom的读写问题
  • ¥15 使用Java milo连接Kepserver服务端报错?
  • ¥15 用ADS设计一款的射频功率放大器
  • ¥15 怎么求交点连线的理论解?
  • ¥20 软件开发方法学习来了