Home  >  Article  >  Backend Development  >  PHP如何删除第一行的空行

PHP如何删除第一行的空行

WBOY
WBOYOriginal
2016-06-13 12:17:46821browse

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 前面
Statement:
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