I am using PHP exec() to run a script that outputs a 3 column, 5 row data table. Right now each row is a single value in my array as follows:
1 => "Nancy Female 32 05/10/2012"
2 => "Drew Male 32 06/16/2012"
3 => "Websy Female 32 11/05/2012"
4 => "Namez Male 32 09/20/2012"
Can I get it to return a nested array for the values in each row?
1 =>
1 => Nancy
2 => Female
3 => 32
4 => 05/10/2012
2 =>
1 => Drew
2 => Male
3 => 32
4 => 06/16/2012
I can always use a delimiter, and rearrange the array afterwards, but didn’t if know there some funcationality to exec() that can do this.
No. All
execknows about is lines of output; it has no further knowledge of what is in those lines.