I have the code below in the PHP class. However, the Array is only returning a value (position [0]) in the table. By executing the SQL statement in MySql, two lines return. Could someone tell you where the error is? Thankful.
if($consUsu->execute()){
$usuDados = $consUsu->fetchAll(PDO::FETCH_OBJ);
foreach($usuDados as $usuario){
$usuarios = $usuario->funcNome."/".$usuario->funcRg."/".$usuario->deptDescricao."/".$usuario->divDescricao;
$usuarios = explode("/",$usuarios);
echo '<table width="100%" border="2px solid" bordercolor="#000000">';
echo '<th width="">NOME</th>';
echo '<th>R.G.</th>';
echo '<th>DEPARTAMENTO</th>';
echo '<th>DIVISÃO</th>';
echo '<th>CARGO</th>';
echo '<tr width="100%">';
for($x = 0; $x < 4; $x++){
echo '<td width="auto">'.$usuarios[$x].'</td>';
}