Question about a text file and foreach
| From: | Jim Greene | Date: | Tue, 18 Mar 2003 16:22:44 +0000 |
| Subject: | Question about a text file and foreach | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140133@lists.php.net to get a copy of this message | ||
Hi All,
I have a text file that has entries like the following:
user1:mbox1:
user1:mbox2:
I basically do: $mboxs = `cat file | grep user1 | cut -d: -f2';
I then want to print out the data in the $mboxs variable (array)
I am trying to use foreach but it does not work.. I am assuming the data is not considered an
array?
Any help would be appreciated.. Thanks
Jim