Sunday, January 27, 2013

how get no of sundays between to dates


$from = "from date";
$to = "to date";
$sunday = 0;
  $from = strtotime($from);
  $to = strtotime($to);
for($i=$from;$i<=$to;$i+=86400)
  {
  $d = date('w',$i);
if($d=='0') $sunday += 1;
  }

Bind Some Event to Element and trigger that function when click the element

Scenario: Suppose if we used same click event function in various web pages. if you want do some logic some page button for that need to re...