Aug 14, 2010

Web Basics with PHP

1. How to handle cookies in PHP
setcookie(), $_COOKIE,

2. How to redirect to a different location
header()

3. How to handle sessions in PHP
session_start(), $_SESSION, session_name(), session_save_path()

4. How to detect browser
get_browser()

5. How to read configuration variables
ini_get()

May 23, 2010

PHP Date

1. How to find current date and time.
strftime(), getdate(), date()

2. How to find the difference of two dates.
You can find the difference of two dates by first converting both the dates into Unix timestamps using mktime() and then subtracting one from the other. The difference is the time in seconds elapsed.

3. How to validate a date.
checkdate()

4. How to set date timezone.
date_default_timezone_set()

5. How to generate unique ID.
microtime()

Apr 24, 2010

PHP Number Functions

Following are the few number handling functions.

1. How to check for a valid number in string.
is_numeric()

2. How to round numbers.
round(), ceil(), floor()

3. How to generate random numbers.
mt_rand(), rand(), srand(), mt_srand()

4. How to format numbers
number_format()

5. Absolute Value
abs()

Mar 13, 2010

PHP String Functions

Following are the few PHP string functions which you will use frequently.

1. How to remove white space from the beginning or end of a string in PHP.
ltrim( ), rtrim( ), trim( )

2. How to read CSV File in PHP
fgetcsv( )

3. How to convert string to array in PHP
explode( )

4.  How to wrap text in PHP
wordwrap( )

5. How to capitalize or convert to lowercase in PHP
ucfirst( ), ucwords( ), strtolower( ), strtoupper( )

Feb 27, 2010

Beginning PHP

Beginning PHP is easy and fun. A lot of resources available online with a mix of free and paid. Following is not a complete exhausted list but a good starting point for your learning curve.

1. PHP For the Absolute Beginner 
A series of introductory tutorials to get you started.

2. PHP Manual
Your complete reference to the PHP functions.

3. w3schools
You will learn how to execute scripts on your server.

4. SitePoint Forums
SitePoint friendly forums to ask your questions.

5. Joomla Content Management System
Joomla is PHP based content management system. It can help you reduce development time for your websites.