The variable is a temporary storage area in computer memory that is named as an identifier. Only be temporary because the variables are allocated into the computer's memory when the program starts only.
Variables that will be used in the program must be declared first. Declaration here means the ordering of memory and determine what kind of data can be stored in it.
The variable name (identifier) are free, but must consider the following matters:
-There should be no spaces
-Can not contain arithmetic operators
-It should not be prefixed by a number
-It should not be a reserved word in a programming language.
-Reflecting the data to be stored.
Format variable declaration:
tipe_variabel nama_variabel;
Type of variable -Global Variables
Variables that are recognized by all environments in the program.
-Local Variables
Variables are only identified by a function only, that is, not recognized by the outside environment in the program.
Definition Arrays
Array is a type of structured data in the form of a number of similar data (same data type), whose numbers remain and be given a specific name.
Array elements arranged in rows and can be accessed at random in the memory.
Array has an address that besebelahan / adjoining dependent width data types.
Array can be an array of 1 dimension, 2 dimensions, even n-dimensional.
The elements array of the same data and can contain the same or different.
Accessing array elements
Array elements can be accessed by the program using a particular index by random or sequential
Charging and collection value at a particular index can be done by setting the value or returns the value of the index in question.
In C, there is no error handling to the limit value of the index, whether the index would be in the index array that is defined or not. It is the responsibility of the programmer. So if the programmer to access the index is wrong, then the resulting value will be different or damaged due to accessing memory address that is not appropriate.
Initialize the array:
Initialize array same as the initial value
array at the time defined.
int value [6] = {8,7,5,6,4,3};
can be simplified to become:
int value = {8,7,5,6,4,3}; Description: The example above means that you reserve a space in computer memory as much as 6 place with an index of 0-5, where the index into-0-value 8, to-1 worth 7, etc., and all elements of type integer data.
Note: To provide niai 0 against all elements of the array at the time defined, you can assign the initial value 0 on the first element. For example:
Int temp [100] = {0};
Will provide the results of zero value of the subscript value of 0 to 99.Excellence array:
-Array is suitable for random access. Any element in the array can be referenced directly without going through the other elements.
-If you are in a location element, it is very easy to drill down to the neighboring elements, both elements of the predecessor or successor element
-If the array elements are the values of independent and all must be maintained, then the use of highly efficient storage
Weaknesses array:
-Array must be of type-homogenous. We can not have arrays in which one element is a character, another element numbers, and other elements are other types
-Not efficient in memory usage
-Arresting a lot of computing time
-On an application, the static representation is not possible
PHP Definition
According to official documents of PHP, PHP stands for PHP Hypertext Preprocessor.
It is a form of language scripts that are placed in the server and processed on the server.
The results are sent to the client, the user using the browser.
PHP is a server-side scripting language that integrates with HTML
to create dynamic web pages. The purpose of the server-side scripting
is the syntax and the commands that we give will be entirely run on the
server but is included in regular HTMLdocuments. PHP is free to use.
You do not have to pay anything for using this software, aka free.
You can download it via the site http://www.php.net. PHP is available
in binary code form as well as complete source code.
PHP Style
PHP gives us flexibility when writing a program,
with records still refer to the conditions set. Please note that by the time
PHP parse the file, the tag will be read to meet the special tags which tell
for menerjemahkanya as PHP code. If the tag is found, then parser to
execute the program code until the end on the closing tag. This also
applies to the PHP code is embedded in HTML documents, which
the parser will find the tags to be found. The rest are outside the tags will
be deemed not is the PHP code, so the parser is also no need to process it.
There are four ways to write a tag that identifies the PHP program.