| Site Map | WizTools.org | jCraze Blog |
![]() |
PHP: Subhash's Jump Start GuideBefore We Start ...According to Rasmus Lerdorf (creator of PHP), PHP is "a server-side, HTML-embedded, cross-platform scripting language". To my knowledge, PHP when expanded becomes "PHP Hypertext Pre-processor". You can get the latest distribution of PHP from PHP.net site. PHP files are to be saved with the extension .php. Syntax:
<?php or
<? Comments
Variables
StringsThey cannot be concatenated by the '+' operator. You have to use the '.' operator. Eg.: -
<?php String is an array. Eg. of getting the first character of a string: -
$str = "This is a test"; Last character of string: - $last = $str[strlen($str)-1]; QuotationStrings are to be placed within double quotes or single quotes. When double quotes are used, all C language escape characters work. In single quotes only '\' & '\\' work.Eg.:
<?php The result will be: Subhash is a GREAT boy Outputecho, print and printf() are the key-words and function used for printing the output. The printf() function has the same syntax as in C. Here is a full example:
<HTML> |
Sign Guestbook
|
Who is Subhash?
The contents of this site are copyright© 2000-2008, indiWiz.com. All Rights Reserved.