note 24541 deleted from ref.strings by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Wed, 21 Aug 2002 21:41:32 +0000 |
| Subject: | note 24541 deleted from ref.strings by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-35322@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);