Snippets
if else example is a basic example of an if then else control structure.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Else, Else Snippets, If Else, Php, Php Snippets
License: Freeware | Download (59): if else example Download |
for loop - simple script is the for loop - basic control structure. This example loops until the variable hits 10 and then breaks out.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: For, For Loop, Loop, Loop Snippets, Php, Php Snippets
License: Freeware | Download (60): for loop - simple Download |
create array from comma separated list script uses the PHP Explode() command to create an array from a comma separated list.By changing the delimiter you can convert tab separated, newline separated, etc...
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Array, Comma Separated, Create, Create Array, From, Separated List
License: Freeware | Download (59): create array from comma separated list Download |
To determine whether a file exists on the server, PHP has a simple function: file_exists(). This can also be used to determine if a directory exists.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Directory, Directory Exists, Exists, File, File Exists, Php Snippets
License: Freeware | Download (57): check if a file or directory exists Download |
This simple PHP example shows how to read a text file into an array, with each line of the file as a seperate element.
Platforms: Windows, *nix, Linux, PHP, BSD
Keyword: Array, File, File Array, Php Snippets, Read, Read File
License: Freeware | Download (64): read file to array Download |
extract filename from a full path string easily returns the filename component of a path with the built-in PHP basename() function. Useful for splitting a string path to get the filename.
Platforms: Windows, *nix, Linux, PHP, BSD
Keyword: Extract, Extract Filename, Filename, From, Path String, Php Snippets
License: Freeware | Download (60): extract filename from a full path string Download |
search array find in array script searches an array to find a specific value.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Array, Find, Find Array, Php Snippets, Search, Search Array
License: Freeware | Download (62): search array find in array Download |
date and time formatting introduces a function that returns a formatted string showing date, time and/or seconds.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Data, Date Formatting, Formatting, Php Snippets, Time, Time Formatting
License: Freeware | Download (59): date and time formatting Download |
redirect browser - Using the php header function, a browser can be redirected to another page.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Browser, Php, Php Snippet, Redirect, Redirect Browser, Redirect Snippet
License: Freeware | Download (57): redirect browser Download |
simple email validation script validates an email address and returns TRUE or FALSE. It checks format only, does not use any networking functions to verify the account actually exists.
Platforms: Windows, *nix, Linux, PHP, BSD
Keyword: Email, Email Validation, Simple, Simple Email, Simple Validation, Validation
License: Freeware | Download (61): simple email validation Download |
form action detect form post script provides you a way to process a php form. This example looks for the existance (regardless of value) of the Submit _POST variable.
Platforms: Windows, *nix, Linux, PHP, BSD
Keyword: Action, Detect, Detect Form, Form, Form Action, Php Snippet
License: Freeware | Download (59): form action detect form post Download |
show referring URL script grabs the referring URL, get the HTTP_REFERER and save it to a variable.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Referring, Referring Url, Show, Show Referring, Show Url, Url
License: Freeware | Download (63): show referring URL Download |
simple form handling shows a very simple form together with the form handling process on a single page.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Form, Form Handling, Handling, Simple, Simple Form, Simple Handling
License: Freeware | Download (58): simple form handling Download |
This snippet will format your date with a leading "0" if needed, i.e., if the date returned is 5/6/2002, then the date will be converted to 05/06/2002.
Platforms: Windows, ASP.NET,
Keyword: Asp, Asp Format, Asp Snippets, Date, Format, Format Date
License: Freeware | Download (60): ASP Format Date Download |
This is a modal dialog that prompts the user for information.It's modal because it prevents any other input by way of hiding all your SELECTs and a semi-transparent DIV that covers the page.
Platforms: Windows, Mac, *nix, Mac OSX, Linux, JavaScript, BSD Solaris
Keyword: Ask User Input, Dialogh, Javascript Dialog, Prompt, Prompt Dialog, User
License: Freeware | Download (62): Modal Dialog Download |
SPGM is a simple PHP script that displays picture galleries on the web. It is intended to provide a very straightforward way to set up online photo albums: create directories, fill them with pictures and upload. SPGM generates HTML 4.01 compliant code and makes extensive use of CSS stylesheets to...
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Gallery, Gallery Manager, Php Snippets, Picture, Simple, Simple Picture
License: Freeware | Download (162): Simple Picture Gallery Manager Download |
VCalendar (Virtual Calendar) is an open source Web calendar application with related tools, for posting and maintaining events and schedules online, in calendar format. VCalendar comes with source code in multiple programming languages: PHP, ASP and ASP.NET (C# and VB.NET); with potential for...
Platforms: Windows, Mac, *nix, Mac OSX, Linux, PHP, BSD Solaris
Keyword: Php, Php Script, Php Snippet, Script, Snippet, Virtual Calendar
License: Freeware | Download (133): VCalendar Download |