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.

Jan 24, 2010

Web Development

Web development is gaining popularity over the conventional desktop applications. The concept of SaaS (Software as a Service) has started to revolutionize the web applications. If you want to dive in the web development then you have to select some scripting language. This is the point where PHP comes in.

PHP is the server side scripting language that makes your web pages dynamic. If you are new to PHP then do spend little time in understanding the basics of the language. Once you are comfortable with the language then  the use of some Framework for the web application development is always recommended. There are plenty of them available. Each of these frameworks have their own pros and cons. The selection of framework depends upon your level of understanding and the learning curve for that framework. Joomla, symfony and cakephp are examples of the frameworks.

Web Development also involves the use of some client side scripting language. Javascript usually servers this purpose. Once you achieve the basics for Javascript then the use of some library is recommended to speed up the development process and reduce the development time. Its all about time in the end as time is money. Jquery, Prototype and Extjs are examples of such libraries.

The third facet to web development is CSS/HTML. The knowledge of CSS does not hurt instead its add value to your skills. Once you achieve the basics for CSS/HTML then you should adopt some framework to reduce cross-browser issues you would face otherwise. 960 is a nice CSS framework.