ovsexia 2016-05-05 07:03 采纳率: 80%
浏览 11845
已采纳

php去掉字符串的第一个字符

例如:
$a = "About us";
处理完后变成
"bout us";
$a 不是固定的
先只考虑英文就好

  • 写回答

4条回答 默认 最新

  • Go 旅城通票 2016-05-05 07:26
    关注

    http://www.w3school.com.cn/php/func_string_substr.asp

     $a = "About us";
    $a=substr($a,1);
    echo $a;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • LokiJ_1414 2016-05-05 07:15
    关注

    $str = "About us";
    $str = substr_replace($str,"",0,1);
    echo $str;

    http://www.w3school.com.cn/php/php_ref_string.asp

    评论
  • 沱江书院 2016-07-18 07:28
    关注

    $str = "About us";
    $str[0] = '';

    评论
  • Leslie丶 2016-09-13 13:25
    关注

    substr_replace可以,或者绕绕远用正则表达式也可以。

    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 请教一下simulink中S函数相关问题
  • ¥15 Hadoop中eclipse运行问题
  • ¥15 在二层网络中,掩码存在包含关系即可通信
  • ¥15 端口转发器解析失败不知道电脑设置了啥
  • ¥15 Latex算法流程图行号自定义
  • ¥15 关于#python#的问题:我在自己的电脑上运行起来总是报错,希望能给我一个详细的教程,(开发工具-github)
  • ¥40 基于51单片机实现球赛计分器功能
  • ¥15 cs2游戏画面卡住,应用程序sid与指挥者sid不匹配
  • ¥15 实验七:Pandas要有实验截图和代码
  • ¥15 TypeError: Make sure that the iterable only contains strings.