\r\n"; preg_match_all('/([^ "]+)|("[^"]*")/',$s,$matches); foreach($matches[0] as $val) { echo "$val
\r\n"; } ?>