PHP截取字符串最后一位進行替換
$image_path = 'http://www.baidu.com/1'; $str = preg_replace('#.$#i', '0', $image_path);第二個參數要替換的內容 ...
$image_path = 'http://www.baidu.com/1'; $str = preg_replace('#.$#i', '0', $image_path);第二個參數要替換的內容 ...