60 lines
942 B
PHP
60 lines
942 B
PHP
|
<?php
|
||
|
define("KONSTVER", "v20240909", true);
|
||
|
|
||
|
echo KONSTVER;
|
||
|
echo "<br>";
|
||
|
|
||
|
$tomb = array("hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat", "vasárnap");
|
||
|
|
||
|
var_dump($tomb);
|
||
|
echo "<br>";
|
||
|
for ($i=0; $i < count($tomb); $i++) {
|
||
|
echo $tomb[$i]."<br>";
|
||
|
}
|
||
|
$tomb[] = "PATAINAP";
|
||
|
|
||
|
echo "<br>";
|
||
|
|
||
|
for ($i=0; $i < count($tomb); $i++) {
|
||
|
echo $tomb[$i]."<br>";
|
||
|
}
|
||
|
|
||
|
//$tomb = array("asd");
|
||
|
|
||
|
/*
|
||
|
for ($i=0; $i < count($tomb); $i++) {
|
||
|
echo $tomb[$i]."<br>";
|
||
|
}
|
||
|
*/
|
||
|
|
||
|
echo "Last element: " . $tomb[count($tomb) - 1];
|
||
|
|
||
|
//unset($tomb);
|
||
|
|
||
|
foreach ($tomb as $elem) {
|
||
|
echo $elem."<br>";
|
||
|
}
|
||
|
|
||
|
foreach ($_SERVER as $key => $value) {
|
||
|
echo $key." értéke: ".$value."<br>";
|
||
|
}
|
||
|
|
||
|
//var_dump($_SERVER);
|
||
|
|
||
|
|
||
|
echo "Asszociatív tömb: <br>";
|
||
|
|
||
|
$atomb = array();
|
||
|
$atomb["elso"] = "matyi";
|
||
|
$atomb["masodik"] = "dani";
|
||
|
|
||
|
echo $atomb["elso"]."<br>";
|
||
|
|
||
|
echo $_GET["nev"]."<br>";
|
||
|
|
||
|
|
||
|
if ($_GET["nev"] == "digi") {
|
||
|
echo "Belépés engedéyezve";
|
||
|
}
|
||
|
|
||
|
?>
|