note 75453 deleted from function.pathinfo by didou

From: Date: Wed, 17 Apr 2019 10:47:31 +0000
Subject: note 75453 deleted from function.pathinfo by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-210609@lists.php.net to get a copy of this message
Note Submitter: phpnet at whoisgregg dot com ---- If you want to easily assign the values returned by pathinfo to separate variable names, list isn't enough. You can use array_values() first to convert the associative array into the indexed array that list() expects: // throws notices, variables aren't set list( $dirname, $basename, $extension, $filename ) = pathinfo($file); // works list( $dirname, $basename, $extension, $filename ) = array_values( pathinfo($file) );

« previous php.notes (#210609) next »