Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
phpfiddle / fiddle_094307.php
Created April 24, 2020 15:23
[ Posted by Priot ] 555555555555555
<?php
header('Content-Type: charset=utf-8');
?>
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="style.css" />
</head>
@phpfiddle
phpfiddle / fiddle_049216.php
Created April 17, 2020 02:54
[ Posted by Victor Lopez ] Tree sample
<?php
$n0000 = ['{id:A0}','COGTO - CLASIFICADOR OBJETO DEL GASTO',null,null];
$n0001 = ['{id:A1}','10000 - SERVICIOS PERSONALES', null, null];
$n0011 = ['{id:A11}','11000 - REMUNERACIONES AL PERSONAL DE TRABAJO PERMANENTE',null, null];
$n0111 = ['{id:A111}','11100 - DIETAS', null, null, '{format:{expanded:true}'];
$n1111 = ['{id:A1111}', '11101 - DIETAS', 'https://www.google.com', 'mainFrame'];
$n1112 = ['{id:A1112}', 'Level 3, Item 2', 'https://www.fast.com', null];
$arrFin = [];
@phpfiddle
phpfiddle / fiddle_088119.php
Created April 16, 2020 01:06
[ Posted by Victor Lopez ] jerarquias para armado de arbol
<?php
$N01 = ["Nivel 01",null,null];
$N02 = ["Nivel 02",null,null];
$N03 = ["Nivel 03",null,null];
$N04 = ["Nivel 04",null,null];
$A2 = array_merge($N01,[$N02]);
$A3 = array_merge($A2,[$N03]);
$A4 = array_merge($A3,[$N04]);
@phpfiddle
phpfiddle / fiddle_060997.php
Created April 14, 2020 16:05
[ Posted by Sumeet ] sumeet index.php
<?php
include("header.php");
include("db.php");
include("function.php");
?>
@phpfiddle
phpfiddle / fiddle_010348.php
Created April 3, 2020 04:01
[ Posted by Sgoehre ] testtesttedst
<?php
$mitarbeiter = ["Bob","Peter","Lisa"];
function ersetzen($array, $wert, $wert_neu) {
if(in_array($wert,$array)) {
$index = array_search($wert, $array);
$array[$index] = $wert_neu;
echo "Der Wert $wert an der Stelle / mit dem Index $index ist in dem Array enthalten und wurde mit $wert_neu ersetzt";}
}
@phpfiddle
phpfiddle / fiddle_066423.php
Created April 2, 2020 18:22
[ Posted by Macfan ] this is just test-code
<?php
$ua = $_SERVER['HTTP_USER_AGENT'];
echo $ua;
?>
@phpfiddle
phpfiddle / fiddle_015027.php
Created March 28, 2020 13:19
[ Posted by Dscholten ] Randomly select something to watch
<?php
$service = array("Hulu", "Amazon Prime", "Netflix", "Disney+", "Showtime");
$genre = array("Romance", "Reality", "Drama", "Comedy", "Action", "Science Fiction", "Documentary");
$type = array("Movie", "TV");
$number = array("1st", "2nd","3rd", "4th", "5th", "6th");
$randService = array_rand($service);
$randGenre = array_rand($genre);
$randType = array_rand($type);
$randNumber = array_rand($number);
@phpfiddle
phpfiddle / fiddle_078464.php
Created March 19, 2020 01:31
[ Posted by Howardb1@earthlink.net ] PHP Date string from a HTML Form validation
<!DOCTYPE HTML>
<html>
<head>
<title>PHP Date string from a HTML Form validation</title>
</head>
<body>
<?php
// define variables and set to empty values
$birthdate = '';
@phpfiddle
phpfiddle / fiddle_085499.php
Created March 12, 2020 12:08
[ Posted by Zeusbeer ] fruitlijst try 2
<style>
label {
float:left;
display:block;
width:250px;
}
input{
display:block;
}
</style>
@phpfiddle
phpfiddle / fiddle_093094.php
Created March 12, 2020 08:55
[ Posted by Zeusbeer ] H7 opdracht 8 fruitlijst sorteren (niet compleet)
<style>
label {
float:left;
display:block;
width:250px;
}
input{
display:block;
}
</style>