0

我正在尝试在我的一个表单中创建一个表格,但是我遇到了一些错误(注意:未定义的偏移量:theme_tableselect() 中的 X)并且我的表格的内容是错误的。

如果有人能告诉我我想念什么,这是我的代码:

<?php
$headers = array(
  t('Nom'), 
  t('Description'), 
  t('Nombre vidéos'), 
  t('Durée'), 
  t('Mode de lecture'),
  t('Date'),
  t('Actions'),
);

$form["gestionvideos_array"] = array(
  '#type' => 'fieldset',
  '#title' => t('Playlists'),
  '#description' => t('Something'),
);
  foreach( $aPlaylist as $oPlaylist ){

    $rows = array(
      'Nom' => ucfirst($oPlaylist->sPlaylistName), 
      'Description' => $oPlaylist->sDescription, 
      'Nombre vidéos' => $oPlaylist->iTotal, 
      'Durée' => $oPlaylist->sDuree, 
      'Mode de lecture' => $oPlaylist->sMode,
      'Date' => $oPlaylist->dCreated,
      'Actions' => $oPlaylist->sAction,
    );
  }

  $form["gestionvideos_array"]["table"] = array(
    '#type' => 'tableselect',
    '#header' => $headers,
    '#options' => $rows,
  );
  ?>
4

0 回答 0