04-08-2012, 03:13 PM
PHP – An Introduction
php-intro.ppt (Size: 430.5 KB / Downloads: 87)
Why is PHP used
Cross PlatformRuns on almost any Web server on several operating systems.One of the strongest features is the wide range of supported databases
Web Servers: Apache, Microsoft IIS, Caudium, Netscape Enterprise ServerOperating Systems: UNIX (HP-UX,OpenBSD,Solaris,Linux), Mac OSX, Windows
Getting Started
Using conditional statements
Conditional statements are very useful for displaying specific content to the user. The following example shows how to display content according to the day of the week.
Benefits:
- Any changes to header or footer only require editing of a
single file. This reduces the amount of work necessary for
site maintenance and redesign.
- Helps separate the content and design for easier maintenance
Additional Information
Some of the new functions added in version 5:
Arrays:array_combine() - Creates an array by using one array for keys and another for its values
array_walk_recursive() - Apply a user function recursively to every member of an array
Date and Time Related:
idate() - Format a local time/date as integer
date_sunset() - Time of sunset for a given day and location
date_sunrise() - Time of sunrise for a given day and location
time_nanosleep() - Delay for a number of seconds and nano seconds
Strings:
str_split() - Convert a string to an array
strpbrk() - Search a string for any of a set of characters
substr_compare() - Binary safe optionally case insensitive comparison of two strings from an offset, up to length characters
Other:
php_check_syntax() - Check the syntax of the specified file
php_strip_whitespace() - Return source with stripped comments and whitespace