Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
PHP snippets by Avan C.
How to Limit Character in The Post Title
PHP
0
5
2327
How to display a disclaimer on posts older than one year
PHP
0
4
2229
How to pre-populate WordPress editor with default content
PHP
0
5
2406
Check if string contains specific word with PHP
PHP
0
5
2249
Get the first letter of a string with PHP
PHP
0
5
13862
Get the current page URL using PHP
PHP
0
8
2527
Get the files and folders of a directory
PHP
0
5
2175
Capitalize the first letter of each word in PHP
PHP
1
7
2597
Remove whitespace from string
PHP
0
4
2187
Send a SMS to a cell phone using the TextMagic API
PHP
1
15
3266
Detect location by IP in PHP
PHP
0
16
2789
Display source code of any webpage
PHP
0
10
2278
Check if server is HTTPS
PHP
0
12
2221
Display Facebook fans count in full text
PHP
0
10
2160
Determine the dominant color of an image
PHP
0
10
2231
Get info about the memory usage
PHP
0
11
2499
Compress data using gzcompress()
PHP
0
10
2453
Whois query using PHP
PHP
0
17
2558