我正在尝试按“ meeting_date”对发票列表进行排序,这是数据库中的一个元。
在这里,我有代码:
<?php if ( ! empty( $invoices ) ) {
foreach ( $invoices as $invoice ) { ?>
<tr>
<td>
<span class="hs-table-facture-img"></span>
<a target="hs_factures_iframe" id="hs-go-to-frame" class="hs-table-facture-link" href="<?php echo $invoice['invoicing_link']; ?>">Facture # <?php echo $invoice['invoicing_number']; ?></a>
</td>
<?php if ( $show_date ) { ?>
<td class="hs-custom-factures-td-bold">
<?php
$title_arr = explode(" ", $invoice['title']);
// get meating date
$get_all_cf = get_post_meta( (int)$invoice['id'], 'wpc_inv_invoice_cf', true );
$meeting_date = $get_all_cf['wpc_inv_cf_meeting_date'];
$meeting_date = date("d.m.Y", strtotime($meeting_date));
?>
<?php echo $meeting_date . $title_arr[0]; ?>
</td>
现在,发票是按最早的顺序显示的。我的客户必须滚动很多才能查看所需的发票。
如何使用它来按会议日期排序此表?
预先感谢您的帮助。