Below are snippets for mattrmiller.
13
Generate a random number or string in PHP.
13
I needed to send an email through an authenticated SMTP server. I found the snippet on the PHP website to do the trick.
16
Format a phone number with php.
4
A simple search array example.
6
Normally in CSS whichever rule is specified last takes precedence. However if you use !important after a command then this CSS command will take precedence regardless of what appears after it.
9
Fixed the regular expression to check for more strict requirements.
11
Example of how to use CURL with PHP.
10
mattrmiller
This is a correct way to do login form auto-focus, checking to see if either username or password have focus already. This prevents someone from typing a username hitting TAB, then having JavaScript chime in, resetting focus to Username while user is typing in their password. In this case, the password is appended to the username which is in plaintext.
6
Another way to generate a unique ID.
9
Change the case of an array.









