I have some php code to get a csv file, put it into an array, and display the array in an html table. This code will be used for a data file with several (about 10) columns. I want to round the data points to 2 decimal places, and have been able to do so using $val = round($val, 2). However, when used within my code, it also changes the format of the time column so instead of 12:00 it displays 12. If anyone knows how to change the decimal format for certain columns in the array while leaving the time column alone, please let me know. Here is the code I have now:\[code\]$out = '';echo "<th> Time </th><th> Temperature </th><th> Speed </th>";$handle = fopen("fakedata.csv", "r");$columns = array(1,3,5);while (($data = http://stackoverflow.com/questions/15628964/fgetcsv($handle, 1000,",")) !== FALSE) { $out = ("<tr>\r\n").$out; foreach ($data as $index=>$val) { if (in_array($index+1, $columns)) { $val = round($val, 2); $out = ("\t<td>$val</td>\r\n").$out; } } echo("</tr>\r\n");} //end whileecho $out;echo "\n</table></body></html>";\[/code\](I know the $out stuff is weird, but its to flip the row order and display the most recent data first). Anyways, my main problem is changing the decimal format for certain rows of the csv array, in this case change only the $column[3] or third column to 2 decimal places. Thanks for the help.