我想在我的表代码中设置或分配id / rel,看看我的代码在这个下面,所以每个表td都有id和rel,这样我就可以在jquery中声明和操作日期,任何帮助都会更加赞赏:
function printdata()
{
if(is_array($_SESSION['chart']))
{
echo "Here's your chart" . "
";
$max = count($_SESSION['chart']);
$th1 = "
" . "No" . "";$th2 = "
" . "Nama Barang" . "";$th3 = "
" . "Harga Barang" . "";$th4 = "
" . "Stok Barang" . "";echo "
echo "
";echo $th1 ;
echo $th2;
echo $th3;
echo $th4;
echo "
";for ($indexo = 0; $indexo < $max; $indexo++) {
echo "
";echo "
" . $indexo."";echo "
" . $_SESSION['chart'][$indexo]['namabarang']."";//i want to assign td rel inside of this echo
echo "
" . $_SESSION['chart'][$indexo]['hargabarang']."";echo "
" . $_SESSION['chart'][$indexo]['stokbarang']."";echo "
Edit";echo "
";}
echo "
";}else
{
echo "Chart is still Empty";
}
}