Hello world, This is sample text
Line2 Hello, world What's going On
We want to search string that contains: world & going
words
VISUAL STUDIO Example:
STEP 1: Press CTRL + F (Open find dialog)
STEP 2: Press ALT + R (Use Regular expression)
STEP 3: Write world(.*)going
in the search field
The search result will be:
Hello, world
What's going
On
because it contains the same time words "world" and "going"`If string value(number) is less than 5 returns "Your number is less than 5!"
$st = strlen("game"); // returns 4
if ($st < 5 ) {
echo "Your number is less than 5!". "\n";
`
if number is more than 5, but less than 10 returns:
} elseif ($st < 10) {
echo "Your number is less than 10!". "\n";
`
And finally, if the number is higher than 10 returns:
} else {
echo "Your number is out of the range:("."\n";
}
`<?php
//Numeric Arrays
$names = array("Mate", "Giorgi", "Davit");
echo $names[1] . "\n";
$names[0] = "Mate";
$names[1] = "Giorgi";
$names[2] = "Davit";
// Associative Arrays
$people = array("Mate"=>"30", "Giorgi"=>"32", "Davit"=>"36");
// or
echo $people['Mate'] = "30" . "\n";
echo $people['Giorgi'] = "32" . "\n";
echo $people['Davit'] = "36" . "\n";
//Multi-Dimensional Arrays
$PEOPLE = array (
'Women' => array('Natalia', 'Elena', 'Inga'),
'Men' => array('Mate', 'Giorgi', 'Zura'),
'Kids' => array('Nia', 'Sofia', 'Rezi')
);
echo $PEOPLE['Kids'][0] . "\n";
echo $PEOPLE['Men'][2] . "\n";
echo $PEOPLE['Women'][1];
?>
<?php
// Variables
$my_name = "Mariam";
$my_weight = 70; //kg
$my_height = 1.77; //m
$live = "Tbilisi";
# About me
echo 'My name is '.$my_name.', I am '.$my_weight.'kg and my height is '.$my_height.', I live in '.$live.'.';
?>
/*
for multiple-line comment
this is also a comment block
and this one too
*/
// and #
// this is for Single line comment
# also For a single-line comment
/*... */
# - /*... */ For inline comment
$sum = 9 /* maybe + 16 */ + 17;
echo $sum;