here is a code snipet, I want to create the link to a website's image file using date function. That website has folders organized as : website/years/months/days but my code is not producing the link, it is just generating a number "2026" which is ambigious. It should like this output: http:/e.piyarawatan.com/paper/2017/04/05/p-1.jpg
<?php
if($_GET['date']!=''){
$date = $_GET['date'];
}
else{
$dateY = date('Y');
$dateM = date('m');
$dateD = date('d');
}
$linkString = "http:/e.piyarawatan.com/paper/" + $dateY + "/" + $dateM + "/" + $dateD + "/p-1.jpg";
// echo "<img src=" + $linkString +"></img>";
echo $linkString;
?>
It is a little problem I am facing, I am actually creating a widget for my wordpress website that will fetch a picture from another website and show as a widget in sidebar.