Drawing custom table (v2018)

Hi,
I need to create a custom table to change data layout from an original one.
I want exactly to display data in line after selecting them as a column.
Below my logic. I use a custom file in V2018.
First, is my logic suitable. If yes what’s wrong.
This is the error message I get :
« Fatal error: Array callback has to contain indices 0 a nd 1 »
THANKS for your help

<?php // Selecting data -------------------------------------------------------------- global $conn; $idcamp= ew_ExecuteScalar ("SELECT IDCampagne FROM t_campagnes WHERE EtatCampagne='En cours'"); $idplan= ew_ExecuteScalar ("SELECT IDplancamp FROM t_plancamp WHERE IDCampagne=$idcamp "); $rowcount=ew_ExecuteScalar ("SELECT COUNT(*) FROM t_plancampdetails WHERE IDplancamp =$idplan"); $desph=ew_ExecuteRow("SELECT Desphasecamp FROM t_plancampdetails WHERE IDplancamp =$idplan"); $etatph=ew_ExecuteRow("SELECT Etaphasecamp FROM t_plancampdetails WHERE IDplancamp =$idplan"); ?> // Drawing table data first row -------------------------------------------------------------- <?php $i = 1; while ($i <= $rowcount): echo ''; $i++; endwhile; ?> // Drawing table data 2nd row -------------------------------------------------------------- <?php $j = 1; while ($j <= $rowcount): echo ''; $j++; endwhile; ?>
'; echo $desph("Desphasecamp"); echo '
'; echo $etatph("Etatphasecamp"); echo '

ExecuteRow() returns an array, you should $xxx[“…”], not $xxx(“…”).

THANKS for your answer.
I made inputs in my code but didn’t have what I wish.
here is my database table

Desphasecamp | Etatphasecamp // Column feads

Sensibilisation | Achevée

Définition des objectifs| En cours

And below the data layout I want to display

Sensibilisation| Définition des objectifs

Achevée ` | En cours

As if lines where pivoted.
This is my code.
global $conn;
$phase=ew_ExecuteRow(“SELECT Desphasecamp, Etatphasecamp FROM t_suiviplancampdet WHERE IDsuiviplancamp =$idplan”);
echo ‘

’;
foreach ($phase as &$value){
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
echo ‘’;
}
echo ‘
’;
echo $phase[“Desphasecamp”];
echo ‘
’;
echo $phase[“Etatphasecamp”];
echo ‘
’;
It displays several times only the first line of the table.
THANKS

You can debug by var_dump($phase).