$niceLinks = '<a href="http://example.com/file9, http://example.com/file10, http://example.com/file11, http://example.com/file12, ">jpeg, jpeg, jpeg, jpeg, </a>';
$link[0] = '<a href="http://example.com/file9">jpeg</a>';
$link[1] = '<a href="http://example.com/file10">jpeg</a>';
$link[2] = '<a href="http://example.com/file11">jpeg</a>';
$link[3] = '<a href="http://example.com/file12">jpeg</a>';
$niceLinks = '<a href="http://example.com/file9, http://example.com/file10, http://example.com/file11, http://example.com/file12, ">jpeg, jpeg, jpeg, jpeg, </a>';
$link[0] = '<a href="http://example.com/file9">jpeg</a>';
$link[1] = '<a href="http://example.com/file10">jpeg</a>';
$link[2] = '<a href="http://example.com/file11">jpeg</a>';
$link[3] = '<a href="http://example.com/file12">jpeg</a>';
$niceLinks
http://example.com/file9, http://example.com/file10, http://example.com/file11, http://example.com/file12,
$niceLinks
формируется так (первая строка опубликованного кода):$niceLinks = '<a href="'.$row['links'].'" target="_blank">'.$row['file_extension'].'</a>';
AND learnings.start_date BETWEEN :date1 AND :date2
AND learnings.finish_date BETWEEN :date1 AND :date2
то выборка работает.start_date
и finish_date
и фильтровать их как один? $date1 = (new DateTime($_POST['date1']))->format('Y-m-d 00:00:00');
$date2 = (new DateTime($_POST['date2']))->format('Y-m-d 23:59:59');
if(empty($_POST['date2'])){
$date2 = (new DateTime($date1))->format('Y-m-d 23:59:59');
}
echo $date1;//2020-12-05 00:00:00
echo $date2;//2020-12-05 23:59:59
есть строка:
нужно получить из нее: