Computer help

Site dedicated to computers


Home | Contact me

Operating Systems

General

Windows 95/98/ME

Windows NT

Windows 2000

Windows XP

Windows 2003

Linux

 

Web

HTML

Cascading Style Sheets (CSS)

Javascript

PHP

ASP

Design, marketing and developement

 

Languages

Visual FoxPro

 

Office suites

Word Processor

Spreadsheet

Presentation

Databases

Email

Links

General links

Search Engine Links

Respond - Prayer website

 

Types


Back to PHP

Booleans

Booleans test whether something is true or false

Example: -

<?php
    $mybool = True;
	
    //Now test it
    if($mybool)
        echo "The result is true";
    else
        echo "The result is false";

?>

Integers

Integers are whole numbers which can either be positive or negative. This includes hexadecimal and octal numbers. Hexadecimal numbers start with a 0, followed by a x and then the hex number. Octal numbers start with 0

Example: -

<?php 
    $a = 1234; // decimal number 
    $a = -123; // a negative number 
    $a = 0123; // octal number (equivalent to 83 decimal) 
    $a = 0x1A; // hexadecimal number (equivalent to 26 decimal) 
?>

Floating point numbers

Are decimal number e.g. has a remainder

Example: -

<?php 
    $a = 1.234; 
    $b = 1.2e3; 
    $c = 7E-10; 
?>

Strings

Strings are for storing alphabetic, numbers and symbols

Example: -

<?php 
    $a = "Hello World"; 
    $b = "1 + 2 = 3"; 
?>






 


Top