title: How to use php exec() to execute a command in Linux and bind the output to an array?
body: <p>I'm performing an egrep in Linux using PHPs exec(). The output is a list of files when actually executing this statement from the command line in Linux. When I echo the result in PHP it only displays the last line of the output.</p>
  
  <p><strong>I want to bind this list to an array so I can further manipulate it in PHP.</strong> I've tried using array() to bind the output to an array and then display it with print_r, but it only shows one item in the array, the last line.</p>