Solved

PHP MySQL mktime weekly data

Posted on 2011-02-25
1
423 Views
Last Modified: 2012-05-11
I have a visitors log table with the time in the mktime format. I want to generate the weekly report based on this data. How can I do weekly increment of the mktime from min mktime to the max mktime. I need to count the weekly hits from this.
0
Comment
Question by:PranjalShah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
Zakabog earned 500 total points
ID: 34985258
<?php

$minTime = mktime(); // Your starting mktime
$maxTime = strtotime("+1 week", $minTime); // One week after your starting mktime

echo date("Y-m-d", $minTime) . " - " . date("Y-m-d", $maxTime); // Print out your $minTime and $maxTime to show you it's working

?>
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question