Bonjour,
Je souhaiterai inclure un tableau (array) en php dans une fonction mail.
Comment faire?
voici mon code, il donne une erreur en ligne mail (cette fonction n'accepte pas l'inclusion d'un tableau en 3e argument). Est-il possible de convertir ce tableau en string pour l'inclure dans un mail?
<?php
$destinataires = 'fabien@toto.com';
$sujet='questionnaire';
$FORM1=$_POST['sexe'];
$FORM2=$_POST['age'];
$FORM3=$_POST['profession'];
$FORM4=$_POST['commandesautres'];
$FORM5=$_POST['raisons'];
$FORM6=$_POST['raisonsautres'];
$FORM7=$_POST['delai'];
$FORM8=$_POST['symbole'];
$FORM9=$_POST['symboleautre'];
$FORM10=$_POST['conditionnement'];
$FORM11=$_POST['frequenceachat'];
$FORM12=$_POST['preferences'];
$FORM13=$_POST['habitude'];
$FORM14=$_POST['montant'];
$FORM15=$_POST['souhaitssite'];
$FORM16=$_POST['autressouhaitssite'];
$FORM17=$_POST['infos'];
$tableau = array ($FORM1, $FORM2, $FORM3, $FORM4, $FORM5, $FORM6, $FORM7, $FORM8, $FORM9, $FORM10, $FORM11, $FORM12, $FORM13, $FORM14, $FORM15, $FORM16, $FORM17);
$afficher_check = "";
mail('destinataire', $sujet, $tableau);
?>Configuration: Mac OS X
Firefox 2.0.0.20