Skip to content

Instantly share code, notes, and snippets.

@stefano-rs
Created April 13, 2016 19:07
Show Gist options
  • Save stefano-rs/a7f63254e0fe46f35f941e4c526e6f3e to your computer and use it in GitHub Desktop.
Save stefano-rs/a7f63254e0fe46f35f941e4c526e6f3e to your computer and use it in GitHub Desktop.
<?php
preg_replace('/^([\d]{4})-([\d]{2})-([\d]{2})$/', '$3/$2/$1', $date);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment