Hello,
Is it possible to have the contents of a shell_exec command go into an array?
I have the following in my PHP script:
<?
$user="$PHP_AUTH_USER";
$command="command.sh";
$output=shell_exec("$command $user");
?>
Which calls a shell script "dirlist.sh", which returns results similar to the
following:
www
www/docs
www/test
Is it possible to have each line put into an array? so that it would look like:
$results = array("www", "www/docs", "www/test");
The shell script has dynamic output, so the number of lines, and line content wouldn't
be the same on every execution.
I would like to use a foreach loop to put the output from the script into a form, so I
am just wondering if the command/array scenerio is possible.
Thank you for any help,
Ken Jansons
E-Mail: [EMAIL PROTECTED]