Afficher tout le contenu d'un array dans une variable
https://forum.alsacreations.com/topic-1-48343-1-Afficher-tout-le-contenu-dun-array-dans-une-variable.html
$array = ('test','test1','test2');
$var = var_dump($array);
ou encore <?php
$items = ('test','test1','test2');
foreach ($items as $item) :
echo $item."<br />\n";
endforeach;
?>
ou encore foreach ($array as $arrayElement)
A regarder : print_r($array);
ou encore echo(implode("",$array));
Afficher le contenu d'un tableau
http://php.net/manual/fr/function.var-dump.php
Exemple :
<?php
$a = array(1, 2, array("a", "b", "c"));
var_dump($a);
?>
Résultat :
array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
}