note 106505 deleted from function.date by danbrown
| From: | danbrown@php.net | Date: | Tue, 15 Nov 2011 16:18:37 +0000 |
| Subject: | note 106505 deleted from function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-184467@lists.php.net to get a copy of this message | ||
Note Submitter: bertoski at gmail dot com
----
The Rod code it's inefficient and excessive large, use something like this instead.
El código de Rod es ineficiente y excesivamente largo, usen esto:
<?php
$dias = array("Domingo", "Lunes", "Martes", "Miercoles",
"Jueves", "Viernes", "Sabado");
$dia = $dias[date("w")];
?>
Try to avoid the use of switch whenever you can, it's a good practice.
Intentes evitar el uso de switch cuando puedan, es una buena practica y un operador (en mi
opinión) innecesario.