The following simple code samples will use PHP regular expressions strip away all characters from a string that are not letters or number. Learn the code.

It’s easy to strip non-numbers from a php string. This is common when attempting to format fields like phone numbers or money amounts for entry into a database. Learn the code.

You can find a lot of search engine results when you look for methods to block the highlighting of text in your HTML. Unfortunately, the top results for disabling text selection either aren’t fully supported (the CSS way) or could cause scripting errors. I’ll explain inside.

There’s a lot of syntax to remember when dealing with JS events, so I figured it would be a good idea to compile a reference list that covers all types of events and the proper syntax to use them. See the examples.