Skip to content

Instantly share code, notes, and snippets.

@cursosdesarrolloweb
Created Mar 5, 2021
Embed
What would you like to do?
<?php
$weekDay = 2;
echo match ($weekDay) {
1 => "Lunes",
2 => "Martes",
3 => "Miércoles",
4 => "Jueves",
5 => "Viernes",
6 => "Sábado",
7 => "Domingo",
default => 'No se ha encontrado el día',
};
// Martes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment