1$ps = explode("\n", `ps aux`); 2$rows = array_map(function($e) { return preg_split("~\s+~", $e, 11); }, $ps);