Bonjour, je cherche comment placer un mot devant chaque données d'un ou bien une fonction de php, qui le fait, pour part étant débutant, j'ai chercher sur internet et je n'est rien trouvée
Voici dans quel contexte je voulais ajoutez mon mot
<?php
$tableaux =
[ 'a',
'b',
'c'
];
$MotaPlacerdevant = "MagiqueWord-";
$count = count($tableaux);
for ($i = 0; $i < $count; $i++)
{
$tableaux[$i] = $MotaPlacerdevant + $tableaux[$i];
}
var_dump($tableaux);
Et quand je execute le code sa me dit ça
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
Warning: A non-numeric value encountered in C:\xampp\htdocs\tableaux.php on line 19
array(3) { [0]=> int(0) [1]=> int(0) [2]=> int(0) }
Merci d'avence pour votre aide aurevoir