split and array logic

From: Date: Tue, 01 May 2001 18:09:15 +0000
Subject: split and array logic
Groups: php.general 
Request: Send a blank email to php-general+get-50985@lists.php.net to get a copy of this message
I can't quite get the logic to create my own associative arrays: if: $stuff[0]="165.33.114.63 anonymous Mozilla/4.0" $stuff[1]="213.35.354.93 anonymous Mozilla/4.0" how do I end up with: $stuff[0][user]="165.33.114.63" $stuff[0][browser]="Mozilla/4.0" $stuff[1][user]="213.35.354.93" $stuff[1][browser]="Mozilla/4.0" I am hacking away at: foreach( $stuff as $cFile ) { list ($user, $junk, $browser) = split (' ', $cFile); } and it hurts.....any hints ? TIA, ____________________________ Matthew Luchak Webmaster Kaydara Inc. mluchak@kaydara.com

« previous php.general (#50985) next »