Si votre email correspond à un compte, vous recevrez un lien de réinitialisation.
$a = array("apple" => array("color" => "red","taste" => "sweet",),"banana" => array("color" => "yellow","taste" => "paste-y",));et voilà l'élement que je voudrais rajouter :$b = array ("test" => array("color" => "blue","taste" => "round"));Voici quelques possibilités:
$a = array( "apple" => array( "color" => "red", "taste" => "sweet", ), "banana" => array( "color" => "yellow", "taste" => "paste-y", ) ); et voilà l'élement que je voudrais rajouter : $b = array ( "test" => array( "color" => "blue", "taste" => "round") ); Voici quelques possibilités:
Bonjour à tous,J'aurais besoin d'une petite aide pour ajouter un élement à un tableau à 3dimensions !Voilà mon tableaux d'origine :$a = array("apple" => array("color" => "red","taste" => "sweet",),"banana" => array("color" => "yellow","taste" => "paste-y",));J'ai plutot l'impression que c'est un tableau à 2 dimensions ...
et voilà l'élement que je voudrais rajouter :"test" => array("color" => "blue","taste" => "sweet");Ok, ca devrai passé
J'ai essayé des choses du style :$b = array ("test" => array("color" => "blue","taste" => "round"));Non, il faut faire :
avec : array_push($a,$b); et ensuite : print_r($a);
Bonjour à tous, J'aurais besoin d'une petite aide pour ajouter un élement à un tableau à 3 dimensions ! Voilà mon tableaux d'origine : $a = array( "apple" => array( "color" => "red", "taste" => "sweet", ), "banana" => array( "color" => "yellow", "taste" => "paste-y", ) ); J'ai plutot l'impression que c'est un tableau à 2 dimensions ...
et voilà l'élement que je voudrais rajouter : "test" => array( "color" => "blue", "taste" => "sweet" ); Ok, ca devrai passé
J'ai essayé des choses du style : $b = array ( "test" => array( "color" => "blue", "taste" => "round") ); Non, il faut faire :
Bonjour à tous,
J'aurais besoin d'une petite aide pour ajouter un élement à un tableau à 3dimensions !
Voilà mon tableaux d'origine :[...]avec : array_push($a,$b); et ensuite : print_r($a);
Alors Merci d'avance.
J'aurais besoin d'une petite aide pour ajouter un élement à un tableau à 3 dimensions !
Voilà mon tableaux d'origine : [...] avec : array_push($a,$b); et ensuite : print_r($a);
Voilà mon tableaux d'origine :$a = array("apple" => array("color" => "red","taste" => "sweet",),"banana" => array("color" => "yellow","taste" => "paste-y",));et voilà l'élement que je voudrais rajouter :"test" => array("color" => "blue","taste" => "sweet");
Voilà mon tableaux d'origine : $a = array( "apple" => array( "color" => "red", "taste" => "sweet", ), "banana" => array( "color" => "yellow", "taste" => "paste-y", ) ); et voilà l'élement que je voudrais rajouter : "test" => array( "color" => "blue", "taste" => "sweet" );
$a['test'] = array('color' => 'blue','taste' => 'sweet') ;print_r($a) ;Et je confirme, c'est bien un tableau à deux dimensions ;)
$a['test'] = array( 'color' => 'blue', 'taste' => 'sweet') ; print_r($a) ; Et je confirme, c'est bien un tableau à deux dimensions ;)