Dynamic var

From: Date: Tue, 06 Jul 2004 15:13:57 +0000
Subject: Dynamic var
Groups: php.general 
Request: Send a blank email to php-general+get-189797@lists.php.net to get a copy of this message
Hi all I've a little problem with creating a dynamic var. This is my line code : $erreur .='Le champs '.${'corresp_chps[\''.$champs.'\']'}.'<br>'; Yes i need the quote, cause it's not my var but a webservice one and the name var is 001 so i've indexed my array with '001' etc..; Thx a lot And this is the array depending of $corresp_chps=array ( '001' => 'Société', '002' => 'Adresse', '003' => 'Complément', '004' => 'Code postal', '005' => 'Ville', '006' => 'Comté/Cedex', '007' => 'Pays', '008' => 'Téléphone', '025' => 'Gsm', '009' => 'Fax', '012' => 'Civilité', '013' => 'Nom', '014' => 'Prénom', '015' => 'Email', '026' => 'Web', '036' => 'Fonction', '010' => 'Question A', '011' => 'Question A autre', '016' => 'Question B', '017' => 'Question B autre', '035' => 'Question C', '042' => 'Question C autre', '033' => 'Coupon SNCF');

« previous php.general (#189797) next »