PHP Variables CODE
Different types of Variables
$name = "George";
$age = 25;
$weight = 75; //kg
$height = 1.85; //m
Variables used in expressions
echo "His name is ".$name."\n";
echo "He is ".$age." years old\n";
echo "He weighs around ".$weight."\n";
echo "he is ".$height."m tall \n";
by Valeri Tandilashvili
2 years ago
PHP
Variables
9
Pro tip: use ```triple backticks around text``` to write in code fences
1
Elena Kuparadze 2 years ago
$my_name = "Elena";
$my_weight = 65; //kg
$my_height = 1.66; //m

//About me
echo 'My name is ' .$my_name. ' , I am ' .$my_weight. ' kg and my height is ' .$my_height;
REPLY
0
გაგა ლომიძე 2 years ago
https://onlinephp.io/c/492af (ჩავასწორე) )))
REPLY
Show 1 reply
0
Zurab Latsabidze 2 years ago
$name = "Zura"; $age = 44; $weight = 110; //kg $height = 1.84; //cm echo 'My name is ' .$name. "\n"; echo "I'm $age old"."\n"; echo 'My weight around '.$weight."\n"; echo "i'm ". $height . "\n";
REPLY
0
ვაჟა ტყემალაძე 1 year ago
$name="Vazha"; $age=24; $height=1.83m; $weight=81kg; echo "Hello, nice to meet you! My name is ' .$my_name. ' , I am ' .$my_weight. ' kg and my height is ' .$my_height. ' I'm ' .$age. ' years old";
REPLY