<?php
$string = "02/12/2018 (Assessment 2) = /86= | Weight: 50.00%";
forEach($array as $item){
// verifica quantas barras "\" a string possui
// se tiver 2 barras é uma data
$dados[ "date" ] = $item;
}
// se o primerio estiver vazio, retorna 00.00
$dados[ "markOK" ] = $mark[0] ? $mark[0] : "00.00";
$dados[ "markTotal" ] = $mark[1];
}
}
}
PD9waHAKCiRzdHJpbmcgPSAiMDIvMTIvMjAxOCAoQXNzZXNzbWVudCAyKSA9IC84Nj0gfCBXZWlnaHQ6IDUwLjAwJSI7CiRhcnJheSA9IGV4cGxvZGUoIiAiLCAkc3RyaW5nKTsKCmZvckVhY2goJGFycmF5IGFzICRpdGVtKXsKICAgLy8gdmVyaWZpY2EgcXVhbnRhcyBiYXJyYXMgIlwiIGEgc3RyaW5nIHBvc3N1aQogICBwcmVnX21hdGNoX2FsbCgiflwvfiIsICRpdGVtLCAkbWF0Y2hlcyk7CgogICAvLyBzZSB0aXZlciAyIGJhcnJhcyDDqSB1bWEgZGF0YQogICBpZihzaXplb2YoJG1hdGNoZXNbMF0pID09IDIpewogICAgICAkZGFkb3NbICJkYXRlIiBdID0gJGl0ZW07CiAgIH0KICAgCiAgIGlmKHNpemVvZigkbWF0Y2hlc1swXSkgPT0gMSl7CiAgICAgICRtYXJrID0gZXhwbG9kZSgiLyIsICRpdGVtKTsKICAgICAgLy8gc2UgbyBwcmltZXJpbyBlc3RpdmVyIHZhemlvLCByZXRvcm5hIDAwLjAwCiAgICAgICRkYWRvc1sgIm1hcmtPSyIgXSA9ICRtYXJrWzBdID8gJG1hcmtbMF0gOiAiMDAuMDAiOwogICAgICAkZGFkb3NbICJtYXJrVG90YWwiIF0gPSAkbWFya1sxXTsKICAgfQogICAKICAgaWYoc3RycnBvcygkaXRlbSwgIiUiKSl7CiAgICAgICRkYWRvc1sgIndlaWdodCIgXSA9IHN0cl9yZXBsYWNlKCIlIiwgIiIsICRpdGVtKTsKICAgfQp9Cgp2YXJfZHVtcCgkZGFkb3MpOw==