1 0 Tag Archives: programming
post icon

How to read CSV (Comma Separated Files) line by line in PHP?

CSV is plain text file, which means you can open it notepad or anyother text editor.
CSV file stores tabular data (numbers and text) in plain-text form.

$file_handle = fopen(“csv_file_name.csv”, “r”);

while (!feof($file_handle) ) {

$line_of_text = fgetcsv($file_handle, 1024);

print $line_of_text[0] . $line_of_text[1]. $line_of_text[2] . “



Leave a Comment
post icon

php difference between two dates

$startDate =”1-1-2011″;
$endDate = “2-2-2011”;
$days = (strtotime($endDate) – strtotime($startDate)) / (60 * 60 * 24);
print $days;

Leave a Comment
post icon

Round Corner box with CSS “Border-radius”

Have you(programmer) ever need a round corner box around some text. What you do

ask designer to make a round corner image and use it as a <DIV> backround, right?

Now with CSS3, IE9, FF7+, you can use CSS to define a “round corner box” using only CSS.


border-radius: 25px;



<div class=”round”>This is round corner box</div>



CSS Round Corner Box using DIV


Leave a Comment