如何显示名称代替名称值

时间:2019-07-23 18:57:15

标签: php

我想显示员工姓名,但此处显示的是员工姓名而不是姓名的值(id)。

<?php

foreach ($result as $row) {
    echo "<tr>";
    echo"<td>$row->userid</td>";
    echo"<td>$row->p_name</td>";
    echo"<td>".date('d-m-Y', strtotime($row->cpf))."</td>";
    echo"<td>".date('d-m-Y', strtotime($row->cpt))."</td>";
    echo"<td>$row->remark</td>";
    echo"<td>$row->atf</td>";
    echo "</tr>";
}

enter image description here

0 个答案:

没有答案