Jump to content

cjb

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

cjb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. cjb

    date();

    This will display every Friday of the current month, use the array $fridays for the unix time. Let me know if you have any questions. $now = time(); $nowYear = date('Y', $now); $nowMonth = date('n', $now); $nowDay = date('j', $now); $uFirstDay = mktime(0,0,0,$nowMonth,1,$nowYear); $uLastDay = mktime(0,0,0,$nowMonth+1, 0, $nowYear); $firstDay = date('D', $uFirstDay); $fridays = array(); $fridaysCount = 0; $day = $uFirstDay; while($day <= $uLastDay){ $weekday = date('D', $day); if($weekday == "Fri"){ $fridays[$fridaysCount] = $day; echo date('D, M j, Y', $day) . "<br>"; $fridaysCount++; } $day = $day + (60*60*24); } echo "<br><br>There are $fridaysCount Fridays this month<br>$fridays[0],$fridays[1],$fridays[2],$fridays[3]";
  2. I'm using the strtotime function to define dates like: $date1 = strtotime("third thursday"); How would I use this function to find the last thursday of the month? $date1 = strtotime("last thursday"); gives the timestamp for last thursday instead of the last thursday of the month.  Thanks.  :)
  3. Barand, That worked, thanks.
  4. I have a db of functions that are called on a certain criteria. I am trying to get those from the db to be called in a page. I try to [code]echo $function[/code] but all that happens is it prints the text out instead of calling the function 'function();'. Is there some other way to echo the text function(); from a db other than using 'echo'?
  5. Thanks for the tutorial. It suggest that you change any blog data types to text making it searchable. Does this mean you cannot search binary data? The only downfall of using text compared to longblob is the maximum length. I have large files to store in the DB and I don't think text will be enough. Any other suggestions?
  6. Does anyone know of any good tutorials of searching a MySQL blob field of binary data. I have multiple types of files uploaded (.doc, .xls, .pdf). Is there a way to search this data with PHP?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.