Archive for the ‘Sample Code’ Category
Wednesday, February 10th, 2010
As you might have seen, all of the PHP statement ends with �;� which would be somewhat similar to Perl. The valid HTML code that was handed back to the server was :
Who are You?
My name is MacGyver.
More in the coming posts when we dig deeper as we widen our ...
Posted in Basic Programming, Sample Code | No Comments »
Sunday, January 10th, 2010
Now that you have installed the necessary web server software and tested that it works (which is included in the manual) we can now get to know the basics of PHP. For our guide we will be using HTTP combined with PHP, this allows PHP code to be embedded ...
Posted in Basic Programming, Sample Code | No Comments »
Friday, December 11th, 2009
The array_chunk() function on the on the other hand as the name implies, divides an array into chunks or several tables from the source table. The syntax goes something like array_chunk(array,size,preserve_key), wherein the array is the table that would be divided, the size is the number of elements which the ...
Posted in Basic Programming, Sample Code | No Comments »
Friday, November 6th, 2009
This form of array declaration allows one to change the case from uppercase to lowercase and vice versa. The syntax goes as follows:
array_change_key_case(array,case)
The array part, specifies which table or array to use and is a required field which is not the case with the key which is automatically assigned a ...
Posted in Basic Programming, Sample Code | No Comments »
Tuesday, August 25th, 2009
There are a lot of programmers who share code and sample applications which you can use for free (provided you clear it up first) but for budding programmers, they're all there for the taking. Sites like <a href="http://websitetips.com/php/">websitetips.com</a>, <a href="http://www.smartwebby.com/PHP/default.asp">Smartwebby.com</a> and many other blogs and help sites allows access to ...
Posted in Basic Programming, Sample Code | No Comments »
Tuesday, July 21st, 2009
Thanks to the basic foundation on which PHP is founded on, the language being free of all legalities and other stuff that makes deployment of other languages on the many platforms quite expensive. But the many people who makeup the PHP community are not ones who keep knowledge to themselves ...
Posted in Basic Programming, Sample Code | No Comments »
Wednesday, April 22nd, 2009
Formatting is one of the hardest tasks to do with respect to cross-platform and scripting programs/pages. Smarty, one of the many PHP advocates has a complete line of products, from community-based ones to those aimed at more commercial purposes enabling the development of enterprise applications over the internet that are ...
Posted in Basic Programming, Information, Related, Sample Code | No Comments »
Sunday, August 10th, 2008
Image Source: www.pragprog.com
Did you know that looping statements doesn’t loop the whole if-else statement if you put an if-else statement in the looping statement? That’s right. Looping statements only goes through the if-else statements once. Once the looping statement activates the statements inside the if-else statement, the looping statement will ...
Posted in Advanced Programming, Basic Programming, Information, Sample Code | 1 Comment »
Tuesday, July 1st, 2008
Arrays are what tables are to C-based programming languages and what databases are for SQL-based languages. Arrays or tables as they are sometimes called can be used to store the contents of several variables and to create one, you use the following syntax:
Array(key=>value)
The array in the syntax refers to the ...
Posted in Basic Programming, Sample Code | No Comments »
Saturday, May 17th, 2008
As stated in the previous entry, shortening or simplifying your source code makes it easier and better when you need to find bugs and a good example of this would be :
Example :
if ($Mickey == true) echo 'Welcome to the Mickey Mouse Club House';
elseif ($MainCharacter == false) echo 'Hi Barney!';
Making ...
Posted in Basic Programming, Sample Code | No Comments »