I am having trouble with this function, and getting it to work. Can someone please help me here.
while($row = odbc_fetch_into($result, $nCol, $res_array)){
$line = '';
// $nCol = 0;
foreach($row as $value){
switch($nCol)
{
case 0:
{
$value = str_replace(".", ":", $value);
$value = $value . sprintf("%s", $value);
}
case 2:
case 3:
default:
{
$value = str_replace('"', '""', $value);
$value = '"' . $value . '"' . "\t";
}
$line .= $value;
}
$data .= trim($line)."\n";
}
}
$nCol++;
$data = str_replace("\r", "", $data);
echo $header."\n".$data;
any help would be appreciated, and if you know a better way to format this data, let me know of another way. Basically what i need is to format the first column different from the rest of the data, that is why i went with the Switch function.
Thanks,
Cameron