Php 向css打印文件表添加工具提示

Php 向css打印文件表添加工具提示,php,css,tooltip,Php,Css,Tooltip,我想从一个文件中打印一个表,这样非极客群体就可以在没有我帮助的情况下轻松地更新表。问题是,我希望表的顶行为每列打印不同的工具提示。如何在php中实现这一点,或者有更好的方法吗 echo”日期可从(工具提示)照片(工具提示)年龄(工具提示)品种(工具提示)获得 要部分回答您的问题,您可以使用: 日期可从获得,仅在Firefox和IE7中测试 至于您关于人们自己更新字段的问题,您必须查看一个数据库;flatfile或SQL 所有标题都已添加到表格的顶行: <?php $tdcount = 1

我想从一个文件中打印一个表,这样非极客群体就可以在没有我帮助的情况下轻松地更新表。问题是,我希望表的顶行为每列打印不同的工具提示。如何在php中实现这一点,或者有更好的方法吗

echo”日期可从(工具提示)照片(工具提示)年龄(工具提示)品种(工具提示)获得


要部分回答您的问题,您可以使用:
日期可从
获得,仅在Firefox和IE7中测试

至于您关于人们自己更新字段的问题,您必须查看一个数据库;flatfile或SQL

所有标题都已添加到表格的顶行:

<?php

$tdcount = 1; $numtd = 13; // number of cells per row 
print "<table class='hovertable'>";
print "<tr><th colspan=13><h1>AVAILABLE HORSES</h1></th></tr>";
   echo "<tr><th title='Date Available From'>Date Available From  </th><th title='Photo'>Photo</th><th title='Age'>Age</th><th title='Breed'>Breed</th><th title='Gender'>Gender</th><th title='Height'>Height</th><th title='Colour'>Colour</th><th title='Price'>Price</th><th title='Bred'>Bred</th><th title='Training'>Training</th><th title='Known soundess illness injuries'>Known soundess illness injuries</th><th title='Description'>Description</th><th title='Status'>Status</th></tr>";

    $f = fopen("available.txt", "r") or die("can't open file"); 
    while (!feof($f)) { 
    $arrM = explode(",",fgets($f)); 
$row = current ( $arrM ); 
if ($tdcount == 1) 
print "<tr onmouseover=\"this.style.backgroundColor='#f9ce68';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\">"; print "<td>$row </td>"; 
    if ($tdcount == $numtd) { 
        print "</tr>"; 
        $tdcount = 1; 
    } else { 
        $tdcount++; 
    } 
    } 
    if ($tdcount!= 1) { 
        while ($tdcount <= $numtd) { 
            print "<td>&nbsp;</td>"; $tdcount++; 
        } print "</tr>"; 
    } 
    print "</table>"; 
?>

您是否有任何代码可供我们参考,以说明您尝试的内容不起作用?您是否可以使用
title
属性:
?它对我不起作用daiscog,不确定为什么!将再次尝试您说“在没有我帮助的情况下更新表?”“,因此您正在寻找一种其他人可以更新/更改的脚本类型,或者您只是请求
样式设置
帮助?其他人只需编辑文本文件即可轻松更新/更改表。根本不编码的人。
<?php

$tdcount = 1; $numtd = 13; // number of cells per row 
print "<table class='hovertable'>";
print "<tr><th colspan=13><h1>AVAILABLE HORSES</h1></th></tr>";
   echo "<tr><th title='Date Available From'>Date Available From  </th><th title='Photo'>Photo</th><th title='Age'>Age</th><th title='Breed'>Breed</th><th title='Gender'>Gender</th><th title='Height'>Height</th><th title='Colour'>Colour</th><th title='Price'>Price</th><th title='Bred'>Bred</th><th title='Training'>Training</th><th title='Known soundess illness injuries'>Known soundess illness injuries</th><th title='Description'>Description</th><th title='Status'>Status</th></tr>";

    $f = fopen("available.txt", "r") or die("can't open file"); 
    while (!feof($f)) { 
    $arrM = explode(",",fgets($f)); 
$row = current ( $arrM ); 
if ($tdcount == 1) 
print "<tr onmouseover=\"this.style.backgroundColor='#f9ce68';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\">"; print "<td>$row </td>"; 
    if ($tdcount == $numtd) { 
        print "</tr>"; 
        $tdcount = 1; 
    } else { 
        $tdcount++; 
    } 
    } 
    if ($tdcount!= 1) { 
        while ($tdcount <= $numtd) { 
            print "<td>&nbsp;</td>"; $tdcount++; 
        } print "</tr>"; 
    } 
    print "</table>"; 
?>