PHP - Invertir Fecha


/ Published in: PHP
Save to your folder(s)

De aa-mm-dd a dd-mm-aa y al revé


Copy this code and paste it in your HTML
  1. function invertirFecha( $fecha ){
  2. return implode( "-", array_reverse( preg_split( "/\D/", $fecha ) ) );
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.