Press "Enter" to skip to content

Posts published in “PHP Code”

php case change

This is available for PHP 3, PHP 4, & PHP 5.

strtoupper — Make a string uppercase

string strtoupper ( string )

Returns string with all alphabetic characters converted to uppercase.

Note that ‘alphabetic’ is determined by the current locale. For instance, in the default “C” locale characters such as umlaut-a (รค) will not be converted.

Example 1. strtoupper() example

php includes

php includes – rather than rewrite several lines of code for each page, for example adding a standardized header (or footer) to hundreds of pages, using a php include can save a lot of effort, especially when it comes time that you want to make universal changes across your site….. edit one file ie… header.php and every page calling for it’s header from this file is changed in single shot.



There are as many uses for using includes as you can imagine, populating a set list of variables, database connection strings…

Touching a file using PHP

Using php to create or touch a file, first checks to see if it already exists.