RE: [PHP] Having fits with input to array
| From: | Susan Ator | Date: | Fri, 14 Nov 2003 20:46:25 +0000 |
| Subject: | RE: [PHP] Having fits with input to array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-169680@lists.php.net to get a copy of this message | ||
Perfect! That did exactly what I needed.
Now, *ahem*, I thought I knew how to assign variables to the elements in
Array2 but *cough* I'm somewhat befuddled. I've not been able to find
anything in the online php manual. Could you point me in the right direction
for that?
Thank you,
susan
-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000@charter.net]
Sent: Friday, November 14, 2003 3:00 PM
To: Susan Ator; 'Lowell Allen'; PHP
Subject: Re: [PHP] Having fits with input to array
$Array1 = array();
$Array2 = array();
$cmd = " -C $pgm --no-headers -o
pid,fname,state,vsz,start_time,flag,user,cputime,args --cols 200";
$ps =
ps $cmd;
$Array1 = explode("\n",$ps);
foreach($Array1 as $line)
{ $Array2[] = explode(" ",$line); }
print_r($Array1);
print_r($Array2);
---John Holmes...