Zugriff auf Array???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Zugriff auf Array???

    Hallo!

    Es kann nicht sein - es ist ... aber doch?
    Wo mach ich den Fehler?

    Kann mal jemand über den Code schauen und mir sagen was nicht passt??

    Danke Orestes!


    PHP Code:
    $sqlText $mysql->select("tblText""link LIKE '".$HTTP_QUERY_VARS[0]."'");
    switch (
    count($sqlText)) {
        case 
    1:
            
    $sqlText $sqlText[0];
            if (
    $REMOTE_ADDR == "192.168.42.197")  {
                foreach (
    $sqlText as $key => $val) {
                    echo 
    "$key => $val<br>\n";
                }
                                                   
    //Ausgabe(1)


                
    echo $sqlText["txtEnglish"];
                                                   
    //Hier kommt nichts (wein!)
            
    }
            
    $smarty->assign('text'$isGr $sqlText["txtGreek"] : $sqlText["txtEnglish"]);
            break;
        case 
    0:
            
    $smarty->assign('text'"databaseError: no Dataset 'link=".$HTTP_QUERY_VARS[0]."' found!");
            break;
        default:
            
    $smarty->assign('text'"databaseError: 'link=".$HTTP_QUERY_VARS[0]."' result ".count($sqlText)." datasets!");
            break;

    Ausgabe(1)
    id => 1
    timestamp => 20030403100243
    datetime => 2003-03-31 12:00:00
    link => home
    txtEnglish => der Text ist da!!!
    txtGreek =>



    Danke
    Risc is part of the game if you want to sit in the captain´s chair.

  • #2
    wenn du mir verrätst, was das machen soll und wo die ganzen veriablen herkommen (z.b. $isGr) dann fällt mir vielleicht was ein
    Last edited by mrhappiness; 03-04-2003, 09:05.
    Ich denke, also bin ich. - Einige sind trotzdem...

    Comment


    • #3
      es geht nur um diesen Bereich!

      PHP Code:
                  foreach ($sqlText as $key => $val) {
                      echo 
      "$key => $val<br>\n";
                  }
                                                     
      //Ausgabe(1)
                  
      echo $sqlText["txtEnglish"];
                                                     
      //Hier kommt nichts (wein!) 
      bei Augabe (1) ist das $key => $val

      txtEnglish => blablabla da,

      bei echo $sqlText["txtEnglish"] kommt nix!
      Last edited by Orestes; 03-04-2003, 09:15.
      Risc is part of the game if you want to sit in the captain´s chair.

      Comment


      • #4
        PHP Code:
        echo '---'.$key.'--- => '.$val."<br>\n"
        kann es sein, dass du hinter txtEnglish nen leerzeichn oder sowas hast?

        was kommt denn so raus?
        Ich denke, also bin ich. - Einige sind trotzdem...

        Comment


        • #5
          Nö - 1000 mal gecheckt!

          auch
          echo $sqlText{"txtEnglish"};

          verzweifel!

          Risc is part of the game if you want to sit in the captain´s chair.

          Comment


          • #6
            meine ausgabe?

            groß-kleinschreibung?

            print_r($sqlText);?
            Ich denke, also bin ich. - Einige sind trotzdem...

            Comment


            • #7
              zum testen:
              PHP Code:
              var_dump($sqlText); 
              ...dann wirst ja seh'n, was da wie drinne steht.
              eval(str_pad(aa|db,4,slarti^~äü_i_)." \"áú¾ïùûä¶³Ðäýï©üèíþç£þé\"^~\"no bugs, only features\";");

              Comment


              • #8
                GEFUNDEN!

                Es war doch ein leerzeichen zuviel
                IN DER DATENBANK!!!!

                DANKE
                Risc is part of the game if you want to sit in the captain´s chair.

                Comment


                • #9
                  Original geschrieben von Orestes
                  Nö - 1000 mal gecheckt!
                  OffTopic:
                  1000 mal geprüft
                  1000 mal is nichts aufgefallen

                  1001 kontrolle
                  und es hat zumm gemacht


                  P.S. ja, ich weiß es passt so überhaupt nich zur melodie
                  Ich denke, also bin ich. - Einige sind trotzdem...

                  Comment


                  • #10
                    OffTopic:
                    Ungahnte Talente Happi??
                    Beantworte nie Threads mit mehr als 15 followups...
                    Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25

                    Comment


                    • #11
                      OffTopic:
                      wann fängt doch gleich Deutschland sucht den wahren Superstar an?
                      Ich denke, also bin ich. - Einige sind trotzdem...

                      Comment

                      Working...
                      X