I don't know if this is the easiest way but a solution
Pipe ps -ef to a file read the file into an array and do with it what
you will.
EG
$filename = "/tmp/psefdump.txt";
exec("ps -ef > $filename");
$lines = file($filename);
foreach ( $lines as $var ) {
// Yadda Yadda
}
Hope this helps...
--
Chris Kay (CK)
Eleet Internet Services
M: 0415 451 372
P: 02 4620 5076
F: 02 4620 7008
E: [EMAIL PROTECTED]
-----Original Message-----
From: Michael P. Carel [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 7 October 2003 11:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] storing the passthru() output as an array
Hi again,
Have another problem here I need to get the output of this syntax
$ps = (passthru("ps -ef"));
and store it in an array line by line, I specifically want to get the
Columns of the PID for this command and store it in a selection box .
Any Idea how, thanks in advance.
Mike
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php