PHP如何删除第一行的空行

WBOY
Release: 2016-06-13 12:17:46
Original
824 people have browsed it

PHP怎么删除第一行的空行
$_POST = preg_replace("/(\n\s*\r)/i", '', $_POST);


这样做不行
$_POST['vod_url_1'] 的值是

引用
 

今天开始我爱你01$227703131
今天开始我爱你02$227771999
今天开始我爱你03$227863744
今天开始我爱你04无字$227909342

------解决思路----------------------
[\n\s\r]+

你 (\n\s*\r) 不行的原因是:\n 必须要在 \r 前面出现。而 windows 中 \r 总是在 \n 前面
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!