我有这样的代码 -如何删除此空白区域?
<?php
$json = 'Two large sardines are seasoned and grilled, then served in a light wine sauce with chopped tomato and generous drizzle of olive oil. Fresh and delicious.';
print_r(preg_replace('/\s+/',' ',$json));
?>
我怎样才能消除这些空白B4 Fresh
。 请帮帮忙,谢谢
但你的代码不会删除它们。或者你想删除这两个空格? – 2012-01-31 09:52:25
什么不适用于您当前的代码? – Bojangles 2012-01-31 09:52:38
你目前有什么不工作?你会得到什么,你期望什么? – DaveRandom 2012-01-31 09:52:59