Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
The for Loop
The for loop is used when you know in advance how many times the script should run. Parameters: init: Initialize the loop counter value test: Evaluates each time the loop is iterated, continuing if evaluates to true, and ending if it evaluates to false increment: Increases the loop counter value
for ($i = 0; $i < 10; $i++) {
    echo "Value of i is: " . $i . "\n";
}
by Elena Kuparadze
3 years ago
0
PHP
Loop
0
Quick tips
ცვლადების გამოცხადებისას თავსართი
$სახელი
; მნიშვნელობის მინიჭებისთვის $სახელი
=
მნიშვნელობა; სასურველია სახელი აღწერდეს ცვლადის დანიშნულებას, არ უნდა იწყებოდეს რიცხვით ან სიმბოლოთი; ეკრანზე გამოსატანად
echo $cvladisSaxeli ;
, echo და print თითქმის იდენტური მეთოდებია. წერის კარგ სტილად მიჩნულია: Camel case_ მაგალითად chemiCvladi, myVar.... Pascal case_მაგალითად ChemiCvladi, MyVar.... Snake case_მაგალითად _chemi_cvladi, _my_var...
by ლუკა დანელია
3 years ago
0
PHP
Variables
0
Logical Operators
1)
<>
ან
!=
_ აბრუნებს
true
თუ შესადარი მნიშვნელობები განსხვავებულია. 2)
<=>
_ აბრუნებს -1 თუ პირველი წევრი ნაკლებია მეორეზე, 0 თუ ტოლია, 1 თუ მეტია.
$two=2 ; $three=3;  print $two<=>$three; // output -1
$four=4; $five=5;     print $five<=>$four; // output 1
$six=6 ; $siX=6 ; print $six<=>$siX; // output 0
3) xor_ აბრუნებს
true
თუ მხოლოდ ერთი პირობა სრულდება. 4) . _აერთიანებს ორი ცვლადის მნიშვნელობებს
$პირველი . $მეორე 
5) .= _ მიერთება მინიჭების ოპერაცია.
$me="me da " ; $shen="shen"; $me.=$shen; // $me ცვლადი იღებს მნიშვნელობას "me da shen" 
6) ??_
$y= value1?? value2 ;
$y იღებს მნიშვნელობა value1 თუ იგი არსებობს და არაა ნულლ, სხვა შემთხვევაში value2
by ლუკა დანელია
3 years ago
0
PHP
Logical Operators
0
// make two different arrays with same value in PHP
$arr1 = [1, 2, 3];
$arr2 = [1, 2, 3];
if ($arr1 === $arr2) {
     echo "true";
     } else {
     echo "false";
     }
// the output will be true
// make arrays in JS
const arr3 = [1, 2, 3];
const arr4 = [1, 2, 3];
if (arr3 === arr4) {
console.log(true);
} else {
console.log(false);
}
// it outputs false
/* because unlike PHP in JS type of arrays is object therefore instead of comparing the values or number of elements , it checks the reference of those array which is different that's why it returned false */ P.S If we use == in JS (only comparing value, not type), however it returns false
by Luka Khitaridze
3 years ago
0
JavaScript
PHP
Array
0
<?php 

// Array types

  # Index array example
    $Georgian_cities = array("Tbilisi", "Mtskheta", "Kaspi", "Gori", "Khashuri", "Kareli");

    echo "I love " . $Georgian_cities[0] . "\n";
    echo "I always enjoy being in " . $Georgian_cities[1] . "," . "today is holiday related to " . $Georgian_cities[1] . "\n";
    echo "In my childhood, I lived in " . $Georgian_cities[2] . "\n";
    echo "I've some relatives in " . $Georgian_cities[3] . "\n";
    echo $Georgian_cities[4] . " is the city where I spent summer in my childhood " . "\n";
    echo "I have never been in " . $Georgian_cities[5] . "," . "although I have relatives in " . $Georgian_cities [5]. " too" . "."
?>
Another Way to Write Variables without an Index Array
  <?php 
  # another way to write variables, without an index array
    $city[0] = "Tbilisi";
    $city[1] = "Mtskheta";
    $city[2] = "Kaspi";
    $city[3] = "Gori";
    $city[4] = "Khashuri";
    $city[5] = "Kareli";

    echo "I love " . $city[0] . "\n";
    echo "I always enjoy being in " . $city[1] . "," . "today is holiday related to " . $city[1] . "\n";
    echo "In my childhood, I lived in " . $city[2] . "\n";
    echo "I've some relatives in " . $city[3] . "\n";
    echo $city[4] . " is the city where I spent summer in my childhood " . "\n";
    echo "I have never been in " . $city[5] . "," . "although I have relatives in " . $city[5] . " too" . "."
  
  ?>
by Mariam Gelkhauri
3 years ago
0
PHP
Array types
Object Oriented PHP Tutorial
0
Foreach Loop
The foreach loop works only on arrays, and is used to loop through each key/value pair in an array. There are two syntaxes:
$students = array ('Elena', 'Nia', 'Zura');

foreach ($students as $student) {
    echo $student . "\n";
}
/*Outputs:
Elena
Nia
Zura*/
$age = array ("Elena" => "39", "Nia" => "11", "Zura" => "41");

foreach ($age as $x => $val) {
    echo "$x = $val" . "\n";
}

/*Outputs:
Elena = 39
Nia = 11
Zura = 41*/
by Elena Kuparadze
3 years ago
0
PHP
Loop
0
HTML სინტაქსი
დეკლარაცია განსაზღვრავს, რომ ეს <!DOCTYPE html>დოკუმენტი არის HTML5 დოკუმენტი <html>ელემენტი არის HTML გვერდის ძირითადი ელემენტი <head>ელემენტი შეიცავს მეტა ინფორმაციას HTML გვერდის შესახებ ელემენტი განსაზღვრავს სათაურს HTML გვერდისთვის ( <title>რომელიც ნაჩვენებია ბრაუზერის სათაურის ზოლში ან გვერდის ჩანართში) ელემენტი განსაზღვრავს დოკუმენტის <body>სხეულს და წარმოადგენს კონტეინერს ყველა ხილული შინაარსისთვის, როგორიცაა სათაურები, აბზაცები, სურათები, ჰიპერბმულები, ცხრილები, სიები და ა.შ. <h1>ელემენტი განსაზღვრავს დიდ სათაურს <p>ელემენტი განსაზღვრავს აბზაცს
by gocha akhalbedashvili
3 years ago
0
HTML
beginner
HTML Tutorial for Beginners
0
PHP
<html> <head> <title>ჩემი პირველი გვერდი</title> </head> <body> <?php echo "გამარჯობა applications.ge "; ?> </body> </html>
by gocha akhalbedashvili
3 years ago
0
PHP
php
Object Oriented PHP Tutorial
0
A variable can have a short name (like x and y) or a more descriptive name (age, carname, total_volume). Rules for PHP variables: A variable starts with the $ sign, followed by the name of the variable A variable name must start with a letter or the underscore character A variable name cannot start with a number A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ) Variable names are case-sensitive ($age and $AGE are two different variables) Remember that PHP variable names are case-sensitive!
`
by Tinatin Kvinikadze
3 years ago
0
PHP
variables
0
PHP has a total of eight data types that we use to construct our variables: Integers: are whole numbers, without a decimal point, like 4195. Doubles: are floating-point numbers, like 3.14159 or 49.1. Booleans: have only two possible values either true or false. NULL: is a special type that only has one value: NULL. Strings: are sequences of characters, like 'PHP supports string operations.' Arrays: are named and indexed collections of other values. Objects: are instances of programmer-defined classes, which can package up both other kinds of values and functions that are specific to the class. Resources: are special variables that hold references to resources external to PHP (such as database connections).
by Tinatin Kvinikadze
3 years ago
0
PHP
data types
variables
0
Results: 1578