Please leave a comment If you found BROKEN LINK OK, thanks for visit my website,...!!!

Shooter Game Chrome PC Free Download Shooter Game Angels Fall First: Planetstorm PC Download Harvest Moon - Back To Nature PC Game Download Download PC Game TMNT 2 : Battle Nexus RIP MediaFire Prince Of Persia Warrior Within Download PC Game Resident Evil 2 img 1 metal slug super vehicle Devil May Cry 3 Portable Cool Game Download

Search


Make Variabel PHP | Lombok Study

As with other programming languages, PHP allows you to define variables. In PHP there are several variable types, but the most common is called a String. It can hold text and numbers. All strings begin with a $ sign. To assign some text to a string you would use the following code:

$welcome_text = "Hello and welcome to my website.";

This is quite a simple line to understand, everything inside the quotation marks will be assigned to the string. You must remember a few rules about strings though:

Strings are case sensetive so $Welcome_Text is not the same as $welcome_text
String names can contain letters, numbers and underscores but cannot begin with a number or underscore
When assigning numbers to strings you do not need to include the quotes so:

$user_id = 987

would be allowed.

Outputting Variables

To display a variable on the screen uses exactly the same code as to display text but in a slightly different form. The following code would display your welcome text:

$welcome_text = "Hello and welcome to my website.";
print($welcome_text);
?>

As you can see, the only major difference is that you do not need the quotation marks if you are printing a variable.

Related Post

0 komentar:

Posting Komentar