Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
modulus(%)
The modulus operator, represented by the % sign, returns the remainder of the division of the first operand by the second operand:
<?php
$n1 =15;
$n2 = 9;
$mod = $n1%$n2;
echo $mod;
//output 6
?>
by Guram Azarashvili
3 years ago
0
PHP
Operators
PHP official doc
0
<?php

 // Multidimensional array
 $regions = [
     "Kakheti"=> [
          "city_1"=>"Telavi",
          "city_2"=>"Gurjaani",
          "city_3"=>"Kvareli",
          "City_4"=>"Sighnaghi"
      ],
      "ShidaKartli"=> [
          "City_1"=>"Kaspi",
          "City_2"=>"Gori",
          "City_3"=>"Kareli",
          "City_4"=>"Khashuri"
      ],
      
      "Imereti"=> [
          "city_1"=>"Kutaisi",
          "city_2"=>"Zestafoni",
          "city_3"=>"Terjola",
          "City_4"=>"Chiatura"
      ]
  ];
  echo 'Kakheti is the region of Georgia' . '.' .  ' Its largest city is ' . $regions['Kakheti']['city_1'] . "\n";
  echo 'My homeland is ' . $regions['ShidaKartli']['City_1'] . '.' . 'I like also ' . $regions['ShidaKartli']['City_2'] .  "\n";
  echo '2 years ago'.  ',' . ' I visited to Imereti Firstly I  went to ' . $regions['Imereti']['city_1'] . "\n"; 
  echo 'after I went to '. $regions['Imereti']['city_3'] . ' and ' . $regions['Imereti']['city_2'] . "\n";
  
  ?> 
by Mariam Gelkhauri
3 years ago
0
PHP
Array types
Object Oriented PHP Tutorial
0
With PHP, you can use one variable to specify another variable's name. So, a variable variable treats the value of another variable as its name. For example:
<?php
     $hello = "Hi!";
     $a = 'hello';
     echo $$a; 
// output "Hi!"
?>
by Guram Azarashvili
3 years ago
0
PHP
PHP official doc
0
<?php
  // associative array
  $University = [
      "name"=>"TSU",
      "location"=>"Tbilisi",
      "rating"=>"the best",
      "faculty"=>"Social & Political Sciences",
      "degree"=>"PhD"
  ];
  echo 'Georgia has an ancient university '. $University['name'] . ' which is in ' . $University['location'] .'.' . "\n";
  echo 'TSU is ' . $University['rating'] . ' in region' .'.' ."\n";
  echo $University['name'] . ' is my university because I study there at the faculty of ' .  $University['faculty'] .'.' . "\n";
  echo 'my current level of teaching is ' . $University['degree'] .'.' . "\n";

?>
by Mariam Gelkhauri
3 years ago
0
PHP
Array types
Associative array
Object Oriented PHP Tutorial
0
by nikoloz nachkebia
3 years ago
0
PHP
Rules to create PHP variable
1
by nikoloz nachkebia
3 years ago
0
PHP
php variables
1
by nikoloz nachkebia
3 years ago
0
PHP
hello students
1
These arithmetic operators are easy to learn, it was not difficult for me to do it, I was able to do it easily. CODE
by nikoloz nachkebia
3 years ago
0
PHP
Arithmetic Operators
1
Hello world CODE
➤ The
echo
is a statement, which is used to display the output. For instance :
echo "Hello world! ";
echo "I am Prgorammer, ","I have no life."." Hola muchachos:))";
The text must be enclosed in single ( ' ' ) or double ( " " ) quotation marks and must also end with a semicolon ( ; ) . Also, the echo statement can output multiple strings separated by commas and dots. ! PHP statements end with semicolons (;).
by Levani Makhareishvili
3 years ago
0
PHP
echo
1
Results: 1578