var createNode = function(tag, attributes, content) {
var node = document.createElement(tag),
attribute;
for (attribute in attributes) {
if (attributes.hasOwnProperty(attribute)) {
node.setAttribute(attribute, attributes[attribute]);
}
}
if (typeof content === 'string') {
node.textContent = content;
} else {
content.map(function(contentItem) {
node.appendChild(contentItem);
});
}
return node;
};
<input type="file" name="file[]" multiple="multiple">
$files = $_FILES['file'];
file_put_contents('logs.txt', print_r($files, true));
if (isset($files)) {
for ($i = 0; $i < count($files); $i++) {
if ($files['error'][$i] == UPLOAD_ERR_OK) {
$email1 -> AddAttachment($files['tmp_name'][$i], $files['name'][$i]);
}
}
}
<?php
function find_value($filename, $value) {
$f = fopen($filename, "r");
$result = 'false';
while ($row = fgetcsv($f, 0,";")) {
if ($row[0] == $value) {
$result = $row[1];
break;
}
}
fclose($f);
return $result;
}
echo(find_value('test.csv', '66:41:0000000:1004'));
?>