Récupérer des données mysql et les placer dans un tableau.
Bonsoir tout le monde
J'essais de stocker des données mysql dans un tableau.
Voici le code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<?php
header("Content-Type: text/plain ; charset=utf-8");
header("Cache-Control: no-cache , private");
header("Pragma: no-cache");
require_once('ConnexionMysql.php');
mysql_select_db("$base");
$requeteSQL="SELECT titre,autheur,duree,them FROM medias";
$reponseSQL = mysql_query($requeteSQL);
while ($voir = mysql_fetch_array($reponseSQL)){
$mon_Tableau[] = $voir("titre","autheur","duree","them"); //ici ligne 19
}
$data = implode($mon_Tableau, ",");
echo("varflash=$data");
?> |
Voici l'erreur
Code:
1 2
|
Fatal error: Function name must be a string in /data/www/***/***/Listevideoflash.php on line 19 |
A +
Récupérer des données mysql et les placer dans un array.
Bonjour tout le monde
Ca ne fonctionne pas, j'ai des warnings.
Voici le code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<?php
header("Content-Type: text/plain ; charset=utf-8");
header("Cache-Control: no-cache , private");
header("Pragma: no-cache");
require_once('ConnexionMysql.php');
mysql_select_db("$base");
$requeteSQL="SELECT titre,autheur,duree,them FROM medias";
$reponseSQL = mysql_query($requeteSQL);
while ($voir = mysql_fetch_array($reponseSQL)){
$mon_Tableau[] = implode(',',$voir);
}
$data =$mon_Tableau;
echo("varflash=$data");
?> |
Voici les warnings, ca concerne les headers.
Citation:
Warning: Cannot modify header information - headers already sent by (output started at /data/www/yhubert/vdebailleul/Listevideoflash.php:2) in /data/www/****/****/Listevideoflash.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /data/www/yhubert/vdebailleul/Listevideoflash.php:2) in /data/www/****/****/Listevideoflash.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /data/www/yhubert/vdebailleul/Listevideoflash.php:2) in /data/www/****/****/Listevideoflash.php on line 7
varflash=Array
A +