Outer Limits Consulting

PHP Cheat Sheet

Year Month Day Week
Y → 2019 m → 01 d → 01 W → 1-52
y → 19 n → 1 j → 1
F → January I → Monday
L → leap? M → Jan D → Mon
t → 28-31
S → th
N → 1-7
z → 1-365
 
Hour Minutes Seconds
H → 01-24 i → 00 s → 00
h → 01-12
G → 1-24
g → 1-12



a → am/pm
A → AM/PM
B → 999
e → UTC


Y-m-d H:i:s→ 2019-02-04 14:00:00
n/j/Y g:i a→ 2/4/2019 2:00 pm
F jS Y → February 4th 2019
F jS, Y → February 4th, 2019
g:i a → 2:05 pm
H:i:s → 14:05:00

MySQLReplace( FIELD, ‘find’, ‘replace’)
PHP str_replace( ‘old’, ‘new’, $FIELD )
strpos( $HAYSTACK, ‘needle’ )
in_array( ‘needle’, $HAYSTACK )

MySQL Integer Sizes
TypeSizeBytesSignedUnsigned
BIGINT(21)89,223,372,036,854,775,80818,446,744,073,709,998,080
INT(11)42,147,483,6474,294,967,295
MEDIUMINT(7)38,388,60716,777,215
SMALLINT(5)232,76765,535
TINYINT(3)1127255












homesimplifydentrixchirotouchphonessupportcontact


Serving clients in Peachtree City, Fayetteville and Newnan since 2001.
Copyright 2001-2024