You want to create a directory.
Use mkdir( ), as in Example 24-25.
Making a directory
The second argument to mkdir( ) is the permission mode for the new directory, which must be an octal number. The current umask is taken away from this permission value to create the permissions for the new directory. So, if the current umask is 0002, calling mkdir('/tmp/apples',0777) sets the permissions on the resulting directory to 0775 (user and group can read, write, and execute; others can only read and execute).
By default, mkdir( ) only creates a directory if its parent exists. For example, if /usr/local/images doesn't exist, you can't create /usr/local/images/puppies. To create a directory and its parents, pass true as a third argument to mkdir( ). This makes the function act recursively to create any missing parent directories.
24.10.4. See Also
Documentation on mkdir( ) at http://www.php.net/mkdir.