Written by Anonymous
𝗵𝗼𝘄 𝘁𝗼 𝗱𝗲𝗳𝗶𝗻𝗲 𝗮𝗿𝗿𝗮𝘆 𝗸𝗲𝘆 𝗶𝗻 𝗽𝗵𝗽;
🔸•🔹
PHP automatically assigns numeric keys starting from 0 if you don't specify them.
Php
Copy code
$array = ["Apple", "Banana", "Cherry"];
// Keys: 0 => "Apple", 1 => "Banana", 2 => "Cherry"
2. Custom Numeric Keys
You can explicitly define numeric keys for the array.
Php
Copy code
$array = [
10 => "Apple",
20 => "Banana",
30 => "Cherry"
];
// Keys: 10 => "Apple", 20 => "Banana", 30 => "Cherry"
3. Associative Keys
You can use strings as keys to create an associative array.
Php
Copy code
$array = [
"fruit1" => "Apple",
"fruit2" => "Banana",
"fruit3" => "Cherry"
];
// Keys: "fruit1" => "Apple", "fruit2" => "Banana", "fruit3" => "Cherry"
4. Mixed Keys
PHP allows arrays to have a mix of numeric and associative keys.
Php
Copy code
$array = [
0 => "Apple",
"fruit" => "Banana",
2 => "Cherry"
];
// Keys: 0 => "Apple", "fruit" => "Banana", 2 => "Cherry"
You can access these keys using functions like array_keys() or check their existence using array_key_exists(). Let me know if you'd like examples of those! 😊
🔸•🔹 🔶 🔷🚩📌❗ nepadėjo jie man, teko įdėti ✤→error_reporting(0);
🔸•🔹if ir else if naudojimo pavyzdys
if ($score >= 90) {
echo "Grade: A";
} elseif ($score >= 75) {
echo "Grade: B";
}
🔸•🔹 🔶 🔷🚩📌 ❗
🔸•🔹kaip nukirpti dalį teksto
<?php
$x = "Hello World!";
echo substr($x, 6, 5);
?>
🔸•🔹 🔶 🔷🚩📌 ❗🔹Rezultatas bus World
🔸•🔹ne.php 🔹 tuščia eilutė failo b2htmνspda.html gale
<?php
$file = './'. trim($NotepadDirectory) .'b2htmνspda.html';
$handle = fopen($file, 'a');
if ($handle) {
// Pridėkite naują tuščią eilutę
fwrite($handle, PHP_EOL);
fclose($handle);
echo "ok <br> jurbar.eu/qq/spda";
} else {
echo "Nepavyko atidaryti failo.";
}
?>
🔸•🔹 🔶 🔷🚩📌 ❗pabandžiau upmi aplanke 106 eilutė, veikia
🔸•🔹laiko nurodymas
<?
date_default_timezone_set("Europe/Vilnius");
$laikas = date("y'md✧H:i/ ");
$laikas4 = date("Y'md✧H:i/ ");
echo $laikas4;
?>
🔸•🔹 🔶 🔷🚩📌 ❗
🔸•🔹"submit" klavišo dydis ir raidės.
<input type="submit" id="submit" value="Įkelti" style="width: 130px; height: 50px; font-size:38px;" />
🦁 🐶🐒 ☘️🌴🐒
🔸•🔹 🔶 🔷🚩📌 ❗
🔸•🔹
🔸•🔹 🔶 🔷🚩📌 ❗
🔸•🔹
🔸•🔹 🔶 🔷🚩📌 ❗
🔸•🔹
jurbar.eu/b# Rinkinys „be antraščių“
jurbar.eu/qq/upmi/laikas.php
[//]: (🔺·🔻 🔸•🔹 🔶 🔷🚩📌❗🍻🍺🍦🔑📝(atnaujintas)👓🔎✍️🇱🇹❓‼️🌍❤️^→ § ^— ↑ ᵃᵇᶜ¹²³ ↓ ₘₙₒⱼₚᵢ₁₂₃ ← ✦ ✧ ✤ 🔗)
** ---------:---------**
https://notepad.pw/share/BtQQMDgadsRVyppIQf5V# il.php