亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    php怎么替換字符串中的換行符

    php替換字符串中的換行符的方法:可以利用php中定義好的變量PHP_EOL來進行替換,如【str_replace(PHP_EOL, '', $str);】。

    php怎么替換字符串中的換行符

    可以使用以下三種方法來解決:

    (推薦教程:php視頻教程)

    1、使用str_replace 來替換換行

    $str = str_replace(array("rn", "r", "n"), "", $str);

    2、使用正則替換

    $str = preg_replace('//s*/', '', $str);

    3、使用php定義好的變量 (建議使用)

    $str = str_replace(PHP_EOL, '', $str);

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號