-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction.php
More file actions
44 lines (39 loc) · 1.06 KB
/
function.php
File metadata and controls
44 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
function result ($tabl) {
$jessy = 0;
if (isset($tabl)) {
foreach ($tabl as $k => $v) {
$jessy = $jessy + $v;
};
return $jessy;
};
};
function result_data ($tabl) {
$result = [];
if (isset($tabl)) {
foreach ($tabl as $k => $v) {
$result[$k] = $v;
};
return $result;
};
};
function creneaux_html ($creneaux) {
$tab = [];
foreach ($creneaux as $k) {
$tab[] = $k;
};
return $tab[0];
};
function get_file ($file) {
$fichier = __DIR__ . DIRECTORY_SEPARATOR . $file;
return file_get_contents($fichier);
};
function add_data_file ($file, $data) {
$fichier = __DIR__ . DIRECTORY_SEPARATOR . $file;
return file_put_contents($fichier, $data, FILE_APPEND);
};
function reset_data_file ($file) {
$fichier = __DIR__ . DIRECTORY_SEPARATOR . $file;
return file_put_contents($fichier, '.');
};
?>