Working with Dates & Hours

Date & hours come in handy when you need to work for something like booking system or calendar or reminder application.



$daysInWeek = array('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday');
<table class="table table-bordered">
    foreach($daysInWeek as $din){
        echo '<td>'.$din.'</td>';

    echo '<a href="index.php?month=2&year=2016">Prev</a><br/>';
    $month = date('m');
    $year = date('Y');
    $totalDays = cal_days_in_month(CAL_GREGORIAN, $month, $year);
    $currentTimestamp = mktime(0, 0, 0, $month, 28, $year);
    $counter = 0;
    echo date('F', $currentTimestamp).' | '.$year.'<br/>';



    for($d=1; $d<=$totalDays; $d++, $counter++)
        $time=mktime(0, 0, 0, $month, $d, $year);
        $firstDay = date('w', $time).' ';          
            if($d == 1 ) {
                for($j = 1; $j<$firstDay; $j++, $counter++){
                    echo "<td>&nbsp;</td>"; 
            if( $counter%7 == 0 ){

                echo '</tr><tr>';

            echo '<td id="tabledata" onmouseover="showHours('.$d.');">';
            echo $d;
            //echo '$100<br/>';
            //foreach($slots as $st){
            //   echo $st.'<br/>';
            echo '</td>';
    } // end of for loop

    echo "<tr/></table>";



15thMay 2014


Working with Google maps

Google maps with geolocation for tracking the user location and get content accordingly.

How to get the country name using latitude & longitude?



$output= json_decode($geocode);

           if(in_array("country", $cn))
            $country= $output->results[0]->address_components[$j]->long_name;
echo $country;

How to get current location with movable marker and get the value in a text field?


<div id="map"></div>
      function initMap() {
          var myLatLng = {lat: -37.706291, lng: 144.91165};

        var mapDiv = document.getElementById('map');
        var map = new google.maps.Map(mapDiv, {
          center: myLatLng,
          zoom: 14

        var marker = new google.maps.Marker({


        google.maps.event.addListener(marker, 'dragend', function (event) {
            document.getElementById("latbox").value = this.getPosition().lat();
            document.getElementById("lngbox").value = this.getPosition().lng();

    <script src=""
        async defer></script>

    <div id="latbox"><input type="text" id="lngbox" /></div>


15thMay 2014


Preston Hill Estates Agent

Preston Hill Estates Agent - real estate agents based on United Kingdom. Based on the clients' requirement, the project was development of a complete website with 4 types of users and feed to for each property. 


  1. Complete website design
  2. Development with PHP, MySQL
  3. Interaction with clients
  4. Multiple user profile
  5. Property search
  6. Usability

15thMay 2014


About me

I'm Subash Thapa (web developer, freelancer, designer).

Web development has been my passion from the day I started using computer. I can help you from the first stage of website i.e designing, programming(developing) till the last stage or deployment, including domain name registration and hosting.

I would love to get engaged in any type of website to design, develop or maintenance.