Tag Archives: CSS

9 VALUABLE AND WORKING IPHONE PROGRAMMING TUTORIALS

Here is a list of some highly valueable and functioning iPhone programming tutorials (list is open): iPhone View Switching Tutorial iPhone Coding – Learning About UIWebViews by Creating a Web Browser iPhone Dev Sessions: Create a Navigation-Based Application Tutorial: JSON Over HTTP On The iPhone iPhone Programming Tutorial – Creating a ToDo List Using SQLite… Read More »

HOW TO LIST FILES IN A DIRECTORY WITH PHP

Here’s a simple way to execute the windows dir or the linux ls in PHP Windows: <?php $row = exec(‘dir’,$output,$error); while(list(,$row) = each($output)){ echo $row, “<BR>\n”; } if($error){ echo “Error : $error<BR>\n”; exit; } ?> Linux: <?php $row = exec(‘ls -ls’,$output,$error); while(list(,$row) = each($output)){ echo $row, “<BR>\n”; } if($error){ echo “Error : $error<BR>\n”; exit; } 

CALCULATE THE NUMBER OF DAYS BETWEEN TWO DATES

Here’s a simple function that calculates the number of days between two dates. <?php //day’s seconds = 86400 function days_between($day_i,$month_i,$year_i,$day_f,$month_f,$year_f){ $days_in_between = (mktime(0,0,0,$month_f,$day_f,$year_f) – mktime(0,0,0,$month_i,$day_i,$year_i))/86400; return $days_in_between; } ?> //If we want to calculate the days between 21/8/2009 and 1/9/2009 then echo days_between(21,8,2009,1,9,2009); //would give us 11