Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/07/2014, 08:22
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 10 meses
Puntos: 379
Respuesta: Ordenar valores de strtotime en PHP

Código PHP:
Ver original
  1. $pepe = array(
  2.     "primer_valor" => "now",
  3.     "segundo_valor" => "10 Saturday",
  4.     "tercer_valor" => "+1 days",
  5.     "cuarto_valor" => "+1 week 2 days 4 hours 2 seconds",
  6.     "quinto_valor" => "next Thursday",
  7.     "sexto_valor" => "last Monday",
  8. );
  9.  
  10. $unix_time = array_map(function($value){
  11.                 return strtotime($value);
  12.              },$pepe);
  13.  
  14. asort($unix_time);
  15. var_dump($unix_time);
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.