2015-11-25 113 views

回答

2

你可以簡單地拆分字符串,用新行「\ n」字符

$mline = 'a b c d 
e f g h 
i j k l'; 
$your_array = explode("\n", $mline); 

echo $your_array[1]; //Specific solution 
echo $your_array[ceil(count($your_array)/2)]; //General solution 
+0

感謝ü問題就解決了。你的回答非常有幫助 –

相關問題