Why does "echo $value[2];" print the third character of my string?
08:55 19 Nov 2018

I need help with my array. When I display the second line of my table, this one shows me the second column of all my lines.

recover the query ( label.php ) :

class Services_Label extends Services_Abstract
{
    public function getlibelle()
    {
        $sRequest = 'SELECT NAME FROM menu WHERE id_application = 2';
        $this->executeQueries($sRequest);
        $aResult = $this->getAllRows();
        $this->freeStatement();

        return $aResult;
    }

create the value (GestidentController.php) :

$oMessage = new Services_Label();
$toto = $oMessage->getlibelle();
        
foreach ($toto as $data)
{
    foreach($data as $key => $value)
    {
        echo $value[2];      
    }
}

The output with echo $value[2] in the nested loop is: isippimnnruud

A $value actually contains this string:

Prise en chargeListe des d�p�tsSaisie par flashageSupervisionSupervision des fluxSuivi des flux informatiquesAdministrationContr�le des RADMContr�le des RPECSurveillanceJournalJournal de bordAudit des depots

I expected the output of $value[2] to be Saisie par flashage.

php string loops offset