Probleme de recuperation de variable dans un tableau
ksinteractive
Messages postés16Date d'inscriptionmardi 11 février 2003StatutMembreDernière intervention21 juillet 2004
-
4 avril 2004 à 10:14
ksinteractive
Messages postés16Date d'inscriptionmardi 11 février 2003StatutMembreDernière intervention21 juillet 2004
-
5 avril 2004 à 23:35
salut j'ai un petit probleme comme vous vous en doutez ;)
cette ligne la affiche le resultat que je veut :
echo $products_array2[$i]['text1'] .'
';//result ok
et ce resultat la je veut continuer a l'exploiter comment re passer ce resultat dansune variable???
si je fais :
echo $products_array2[$i]['text1'];
sa marche mais si je fais :
$mavariable= $products_array2[$i]['text1'];
sa marche pas ...
voici le code :
$products_array2 = array(); $products_query2 tep_db_query("select orders_id, text from " . TABLE_ORDERS_TOTAL . " where orders_id '" . (int)$orders['orders_id'] . "' AND title='Total:'");
while ($products2 = tep_db_fetch_array($products_query2)) {
$products_array2[] = array(
'id' => $products2['orders_id'],
'text1' => $products2['text'],);
}
$products_displayed2 = array();
for ($i=0, $n=sizeof($products_array2); $i<$n; $i++) {
if (!in_array($products_array2[$i]['id'], $products_displayed2)) {
echo "Montant Total : ";
echo $products_array2[$i]['text1'] .'
';//result ok