Help making bold words in exporting to xls

Discussion in 'PHP' started by jigen7, Oct 10, 2007.

  1. #1
    i have here a piece of code that saves the headers of sql field name to the 1st row of the xls file ,can anyon1 modify this code so that the generated string is in bold format in xls file??thx

    $count = mysql_num_fields($result);
    for ($i = 0; $i < $count; $i++){
    $header .= mysql_field_name($result, $i)."\t";
    }
     
    jigen7, Oct 10, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Perhaps;
    
    if ($i == 0)
    {
        $header .= '<b>' . mysql_field_name($result, $i) . "</b>\t";
    }
    else
    {
        $header .= mysql_field_name($result, $i)."\t";
    }
    
    PHP:
    ??
     
    nico_swd, Oct 11, 2007 IP