* Thus wrote Russell Curtis: > I'm trying to use the split function to identify the extension of an > uploaded file: > > $file_name = $_FILES['userfile']['name']; > $pieces = explode(".", $file_name); > $file_extension = $pieces[1]; // piece2
You could always use the built in php function pathinfo() http://php.net/pathinfo Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php