note 24541 added to ref.strings

From: Date: Wed, 21 Aug 2002 01:18:34 +0000
Subject: note 24541 added to ref.strings
Groups: php.notes 
Request: Send a blank email to php-notes+get-35284@lists.php.net to get a copy of this message
In case any of you wanted to parse a deliminated text file, I've come up with a script that may of some use. function thisone() { $info = array(); $x=file("yourData.txt"); $names = explode('|',$x[0]); unset($x[0]); foreach($x as $keyx=>$valuex) { $w = explode('|',$valuex); foreach($w as $keyw=>$valuew) { $bob[$keyx][$names[$keyw]] = $valuew; } } return $bob; } $bin = thisone(); print_r($bin); -- http://www.php.net/manual/en/ref.strings.php http://master.php.net/manage/user-notes.php?action=edit+24541 http://master.php.net/manage/user-notes.php?action=delete+24541 http://master.php.net/manage/user-notes.php?action=reject+24541

« previous php.notes (#35284) next »