[Système] function return echo
bonjour,
je ne comprend pas ...enfaite j'ai une fonction qui doit retourner 5 variables...mais impossible d'afficher ces variables dans ma pages ...alors que quand je fait echo...dans ma fonction et qu'ensuite j'apelle la fonction la variable est bien la !
page de code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
function consult_nom_attente($dbconn_dns,$asp,$qualif,$id,$dc,$de,$att,$i)
{
$query_consult = $dbconn_dns->query("select d.domainenom,cli.organisme,d.passdomaine,d.nic_expires,max(c.daterelance)from domaine_attente da, domainecoord d, client cli , commentaires c where d.idxdomaine = da.idxdomaine and d.asp=6 and d.qualification = 'C' and d.datecreation isnull and dateenregistrement isnull and da.idxattente = 1 and cli.numclient = d.numclient and chargeclientele = 5 and c.idxdomaine = d.idxdomaine group by d.domainenom,passdomaine,d.nic_expires,cli.organisme");
$record_consult = $dbconn_dns->fetch_array($i, $query_consult);
$domainenom = $record_consult[domainenom];
$organisme = $record_consult[organisme];
$passdomaine = $record_consult[passdomaine];
$nic_expires = $record_consult[nic_expires];
$max = $record_consult[max];
return $domainenom;
return $organisme;
return $passdomaine;
return $nic_expires;
return $max;
} |
page normal
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
<?php for ($i=0; $i != $nb ; $i++)
{ consult_nom_attente($dbconn_dns,$asp,$qualif,$id,$dc,$de,$att,$i);?>
<tr>
<td class="result-pairrelief"> <? echo $domainenom; ?> </td>
<td class="result-pairrelief"> <? echo $organisme; ?> </td>
<td class="result-pairrelief"> <?php echo $passdomaine; ?> </td>
<td class="result-pairrelief"> <?php echo $nic_expires; ?> </td>
<td class="result-pairrelief"> <?php echo $max; ?> </td>
<?
}
?> |
Merci a tous...bizx!