Variables In Php

Defining and using php variables: Defining variables in php is done by placing a "$" sign in front of the variables. In php, variables can be defined without putting a value in the variables. Variables can start with a letter, number or underscore (_). There can be no spaces or other signs in the variable.

Example:

<?php 
    $adi = "Try";
    $no = 55;
    $soyadi = "Test";
    $tc_kimlik = "12345678901";
    echo  $adi."\n";
    echo  $no."\n";
    echo  $soyadi."\n";
    echo  $tc_kimlik."\n";
    
?>

output:

Try
55
Test
12345678901

 

Tagged In:

Software developer

26 Total Posts