Am 2005-09-06 12:18:18, schrieb [EMAIL PROTECTED]:
$etcpasswd = "username:passwd:123:345::/home/username:/bin/sh";
$pwdarr = explode(":", $etcpasswd);
echo $pwdarr[4];
OK, this works now.
But can I read a whome /etc/passwd into an 3d array ?
This would avoid multiple reads...
I know, that I
I am searching for the right equivalent for "cut -d : -f5"
but it must work with php4.
$fields = explode(':', $string, 5);
Hmmm.. that's going to create a 5 element array assigned to $fields. So,
using /etc/passwd as an example...
philip:*:1000:1000:Philip Hallstrom:/local/home/philip:/bin
2 matches
Mail list logo