Library of commonly-used PHP functions.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Returns the number of days since the epoch.
Fetches a row from a given result set from the database. This is a wrapper for DB-specific methods, so you should be fairly easily able to change the specific database method called within here and make it work transparently.
Fetches an object from a given result set from the database, as an object of the type specified by $_className. This class definition must be already defined.
Fetches a row from a given result set from the database. This is a wrapper for DB-specific methods, so you should be fairly easily able to change the specific database method called within here and make it work transparently.
Returns the last inserted ID from the database. This is a wrapper for DB-specific methods, so you should be fairly easily able to change the specific database method called within here and make it work transparently.
Fetches a row count from a given result set from the database. This is a wrapper for DB-specific methods, so you should be fairly easily able to change the specific database method called within here and make it work transparently.
Performs a query on the database and returns the result set. This is a wrapper for DB-specific methods, so you should be fairly easily able to change the specific database method called within here and make it work transparently.
Returns a float value of the current Unix timestamp with milliseconds, from the output of microtime().
Displays a <select> box. Uses the normal conventions, e.g. table names begin with "tbl", key fields are "id" and identifier fields are "name".
Returns whether a date falls on a weekend.
Makes a string's first character lowercase. Does the opposite of ucfirst.
Returns a string representation of the date, of differing format depending on how recent the date is.
Returns a string representation of the date and time, of differing format depending on how recent the date is.
Returns the "s" character which appears on the end of plural numbers. Will return an empty string if no plural is required (i.e. the input was 1).
Sends HTTP headers to redirect elsewhere, then exits the script.
Converts spaces to entities.
Maintains state.
To use, create a global array called $stateVars which contains strings representing the names of global variables you wish to pass around.
Example of using GET-mode syntax:
- print "example.php?".state( "GET" );
Example of using POST-mode syntax:
- print "<form action=\"example.php\" method=\"post\">";
- print state( "POST" );
- print "</form>";
Returns the weekday of a date, according to date("w").
Returns the number of words in a string. Words are counted in a fairly primitive but 'good enough' manner.
Documentation generated on Mon, 11 Apr 2005 16:39:48 +0100 by phpDocumentor 1.3.0RC3