Php / include

thomas.r Messages postés 79 Date d'inscription   Statut Membre Dernière intervention   -  
thomas.r Messages postés 79 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

J'ai un vrai problème d'include. En fait j'ai deux pages php dont une qui fait appel à l'autre à différents endroits.
Le problème c'est qu'une fonction est donc appelé plusieurs fois et j'obtiens l'erreur : Fatal error: Cannot redeclare mafonction()
Comment est ce que je peux faire pour ne plus avoir cette erreur.

Merci.
A voir également:

1 réponse

Geolindien
 
Deja poste nous ton code
0
thomas.r Messages postés 79 Date d'inscription   Statut Membre Dernière intervention   2
 
voilà:
include 'function.php'
for ($Index_gauche=0;$Index_gauche<ceil($lngIndex/2);$Index_gauche++){
?>
<table width="400">
<tr valign="top">
...
</td>
</tr>
<tr>
<td colspan="3" class="lightBlueBg"></td>
</tr>
</table>
<?
}
?>
</td>

<tr>
<td valign="top">
<?

include 'function.php'
for ($Index_droite>=ceil($lngIndex/2);$Index_droite<$lngIndex;$Index_droite++) {
?>
<table width="400">

</tr>
<tr>
<td colspan="3" class="lightBlueBg"></td>
</tr>
</table>
<?
}
?>
</td>
</tr>
</table>
0