Einzelnen Beitrag anzeigen

Benutzerbild von DGL-luke
DGL-luke

Registriert seit: 1. Apr 2005
Ort: Bad Tölz
4.149 Beiträge
 
Delphi 2006 Professional
 
#10

Re: [PHP] Namen einer Variable als String...

  Alt 13. Dez 2005, 14:07
Schau mal:

Code:
$some_obscure_variable_i_cant_call_by_reference = 'blubb';
$var = 'some_obscure_variable_i_cant_call_by_reference';
print $$var; //Ausgabe: "blubb"
if(isset($$var)) {
print "awesome!";
}
else {
print "sad";
}


//Nachtrag: Ja, Flocke....
Lukas Erlacher
Suche Grafiktablett. Spenden/Gebrauchtangebote willkommen.
Gotteskrieger gesucht!
For it is the chief characteristic of the religion of science that it works. - Isaac Asimov, Foundation I, Buch 1
  Mit Zitat antworten Zitat