How can a simpler approach be taken to solve the issue of identifying weekdays in a text string using PHP?

One simpler approach to identifying weekdays in a text string using PHP is to create an array of weekday names and then check if any of those names appear in the text string. This can be achieved by using the `stripos` function to perform a case-insensitive search for each weekday name in the text string.

$text = "Today is Monday";
$weekdays = array('monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday');

foreach ($weekdays as $weekday) {
    if (stripos($text, $weekday) !== false) {
        echo "Weekday found: " . ucfirst($weekday);
        break;
    }
}