What are best practices for organizing and sorting linked files in PHP?

When working with linked files in PHP, it is important to organize and sort them efficiently to maintain a clean and structured codebase. One best practice is to create separate directories for different types of files (e.g., CSS, JavaScript, images) and use meaningful names for the files to easily identify their purpose.

// Example of organizing and sorting linked files in PHP

// Define directories for different file types
$css_dir = 'css/';
$js_dir = 'js/';
$img_dir = 'images/';

// Include CSS file
echo '<link rel="stylesheet" type="text/css" href="' . $css_dir . 'styles.css">';

// Include JavaScript file
echo '<script src="' . $js_dir . 'script.js"></script>';

// Display image
echo '<img src="' . $img_dir . 'logo.png" alt="Logo">';