[PHP] Interprétation

Fermé
PeterPeterPeter Messages postés 202 Date d'inscription jeudi 17 juillet 2008 Statut Membre Dernière intervention 22 juin 2010 - 19 sept. 2008 à 12:08
PeterPeterPeter Messages postés 202 Date d'inscription jeudi 17 juillet 2008 Statut Membre Dernière intervention 22 juin 2010 - 19 sept. 2008 à 12:17
Bonjour,

J'ai actuellement un petit problème, en fait j'ai cette ligne dans mon code :

$th = '<table class="dyntable"><thead><tr><th width="35">'.arrangeUpAndDown($page,$nom, 'id').' ID</th><th width="150">'.arrangeUpAndDown($page, $nom, 'nom').'Nom</th><th width="150">'.arrangeUpAndDown($page, $nom, 'statut').'Statut</th><th>Client</th><th>'.arrangeUpAndDown($page, $nom, 'date_expi').'Expiration</th><th width="60">Options</th></tr></thead><tbody>';


Et je voudrais juste la stocker sans qu'elle soit interprétée tout de suite afin de justement l'exploiter plus tard dans une autre fonction.

Je ne sais pas si vous m'avez compris, sinon dites le j'essayerai de reformuler plus clairement.

Merci par avance pour voter aide.
A voir également:

2 réponses

Mimiste Messages postés 1149 Date d'inscription samedi 17 mai 2008 Statut Membre Dernière intervention 6 mars 2016 206
19 sept. 2008 à 12:14
Bonjour

Un petit exemple de ce que tu voudrai faire sera pas de refus parceque la je vois pas trop ^^
Ta ligne est stockée dans la variable $th la il me semble ?
-1
PeterPeterPeter Messages postés 202 Date d'inscription jeudi 17 juillet 2008 Statut Membre Dernière intervention 22 juin 2010 30
19 sept. 2008 à 12:17
en gros je veux faire :


<?php
function toto($th) {
   echo $th;
}

$th = '<table class="dyntable"><thead><tr><th width="35">'.arrangeUpAndDown($page,$nom, 'id').' ID</th><th width="150">'.arrangeUpAndDown($page, $nom, 'nom').'Nom</th><th width="150">'.arrangeUpAndDown($page, $nom, 'statut').'Statut</th><th>Client</th><th>'.arrangeUpAndDown($page, $nom, 'date_expi').'Expiration</th><th width="60">Options</th></tr></thead><tbody>';

toto($th);
?>


Le problème c'est qu'il veut exécuter arrangeUpAndDown($page,$nom, 'id') alors que je veux justement que executer le tout dans la fonction.
-1