What are the potential issues with using if-else statements for conditional logic in PHP, especially in complex scenarios?

Using if-else statements for conditional logic in PHP can lead to code that is difficult to read, maintain, and debug, especially in complex scenarios. One way to address this issue is by using switch statements, which can make the code more organized and easier to understand.

// Example of using switch statement for conditional logic
$day = "Monday";

switch ($day) {
    case "Monday":
        echo "Today is Monday";
        break;
    case "Tuesday":
        echo "Today is Tuesday";
        break;
    // Add more cases as needed
    default:
        echo "Today is not Monday or Tuesday";
}