Skip to content

Instantly share code, notes, and snippets.

@GideonBabu
Last active January 15, 2020 10:37
Show Gist options
  • Select an option

  • Save GideonBabu/1d655cca374abe2d7a749b8f820fd6d5 to your computer and use it in GitHub Desktop.

Select an option

Save GideonBabu/1d655cca374abe2d7a749b8f820fd6d5 to your computer and use it in GitHub Desktop.
Useful PHP Scripts
To split the date and time from datetime value
$date = strtotime('8/29/2011 11:16:12 AM');
$dat = date('m/d/y', $date);
$tme = date('H:m:s A',$date);
ucfirst() - makes the first letter of the input string uppercase.
upfirst('hello world!') - returns 'Hello world!';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment