Re: File Path into variables

From: Date: Sun, 15 Oct 2000 21:13:56 +0000
Subject: Re: File Path into variables
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3622@lists.php.net to get a copy of this message
explode() or split() on / and store those in an array, you now have your variables... then to get data out of your database, put the vars in an array and implode() them or do it straight out $full = "/" . $letter . "/" . $artist . "/" . $song; /cody caughlan Jeremy wrote: > I am wondering how to turn a file path into variables that can be stored in a database. I need > to get variable for multiple files. An example file is > /l/led_zeppelin/stairway_to_heaven.txt > > I want to make > /$letter/$artist/$song > and put the song txt or html file into a Blob field. > > My database would look like this : > > id,letter,artist,song,lyrics > > Does anybody know how to do this? I know how to open, copy, and rename files, but am unclear on > how to turn file paths into variables, or do mass additions > > Any help would be appreciated. > Thanks, > Jeremy Ferwerda

« previous php.db (#3622) next »