[PHP] Interprétation

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.
Configuration: Windows XP
Firefox 3.0.1

2 réponses

  1. 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. 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 ?