Support Forums

Full Version: PHP Tut 3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is just some more variables. Arent variables Fun?? Please thank and rate 5 stars! Dont forget to comment!

Boolean: It specifies if something is true or false
Code:
<?php

$login = true;

?>

Integer: Is like whole numbers ( 1, 200, 134, -87 )
Code:
<?php

$health = 50;

?>

Floating-point: Usually a fractional number like 3.3 or 3.141592653589 (THATS SOME PIE FOR YA). They can be expressed in decimal form or scientific Notation!!! OMFG
Code:
<?php

$grade = 59.4999;

?>

String: Its a sequence of characters like "whassup" or "supaman"

Code:
<?php

$alias = 'Minus';
$sport = 'hockey';
$sent = "$alias loves to play $sport";

echo $sent;

?>
A good tutorial for showing how variables work, tbh. Smile