Tobias H.: Objekt Problem

hallo,
ich habe ein ziemlich blödes problem. und zwar möchte ich folgendes ausgeben:

<?
echo $this->mysql->$this->table;
?>

ich greife also auf das objekt mysql zu und möchte dann variabel eine variable davon ausgeben. bloß so wie es oben geschrieben ist geht das nicht. wie muss ich das schreiben?

vielen dank für eure antworten! ;)

gruß,
tobias

  1. hi,

    echo $this->mysql->$this->table;

    ich greife also auf das objekt mysql zu und möchte dann variabel eine variable davon ausgeben.

    $this->mysql is das Objekt, also liegen Variablen (Attribute) direkt darunter.

    $this->mysql->attributname

    Und wenn der Attributname dynamisch in einer Variablenstehen soll, dann halt

    $this->mysql->$variablerAttributname

    gruß,
    wahsaga

    --
    /voodoo.css:
    #GeorgeWBush { position:absolute; bottom:-6ft; }
    1. $this->mysql->$variablerAttributname

      aber genau das geht eben nicht, dann kommt immer folgender fehler:

      Catchable fatal error: Object of class Configuration could not be converted to string

      1. hi,

        $this->mysql->$variablerAttributname

        aber genau das geht eben nicht, dann kommt immer folgender fehler:

        Catchable fatal error: Object of class Configuration could not be converted to string

        Und was ist die Klasse Configuration?
        Hast du in $variablerAttributname etwas drinstehen, was sich nicht in einen String konvertieren lässt?

        gruß,
        wahsaga

        --
        /voodoo.css:
        #GeorgeWBush { position:absolute; bottom:-6ft; }