PHP Data Type and Variable Explanation

Data type and variable are frequently used topics in PHP programming. So, PHP programmer should have basic and clear concept on PHP data types and variables. Various types of data are used in PHP programming and variables usually hold these data in memory for a certain time. In my previous article I discussed PHP basic program with example and in this article I will discuss basic concept on PHP data types and variables. PHP Data Types Like other programming languages, various types of data are used in PHP programming language. These data can be categorized into 8 types. The following table is a summarization of the various data types used in PHP Programming Language. No. Data Types Description 1 Integer Real number without decimals. Such as 1, 5, 100, 1000 and so on 2 Float Real number with decimals. Such as 35.5, 100.10 and so on. 3 String Sum of several characters that means a word, a sentence or several sentences 4 Boolean Either true or false value. True represents 1 and false represents 0. 5 NULL This is a special data type in PHP which has no data value. 6 Array Various types of data are kept within this […]

Continue reading