mhhh .. ich bin heute unfähig *lach*

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • mhhh .. ich bin heute unfähig *lach*

    $sz1=array(" ","ä","ö","ü","/","\\","\"","'","<",">","!","%","&","+","~");
    $sz2=array("_","ae","oe","ue","","","","","","","","","","","");
    for ($c=0; $c<=14; $c++)
    {
    $trackname = str_replace ($sz1['$c'], $sz2['$c'], $trackname);
    }


    was ist falsch ???

    THX
    Don't dream your life but live your dream
    (c)DJ Species ;-)

  • #2
    PHP-Code:
    $from = array(" ","ä","ö","ü","/","\\","\"","'","<",">","!","%","&","+","~");
    $to = array("_","ae","oe","ue","","","","","","","","","","","");

    $trackname strtr($from$to$trackname); 
    btw: was sollte denn falsch sein, was meldet php ?
    mfg,
    [color=#0080c0]Coragon[/color]

    Kommentar


    • #3
      es tut sich einfach gar nichts ... wenn ich das am Bildschirm ausgeben sind die Sonderzeichen usw immer noch genauso vorhanden wir voher ...

      Ich werd deins erstmal probiern
      Don't dream your life but live your dream
      (c)DJ Species ;-)

      Kommentar


      • #4
        folgendermaßen @ coragon
        In der Zeile:

        $from = array(" ","ä","ö","ü","/","\",""","'","<",">","!","%","&","+","~");

        gibt es einen Parse Error

        folgendermaßen nachkorrigiert:

        $from = array(" ","ä","ö","ü","/","\\","\"","'","<",">","!","%","&","+","~");


        wird der Teststring: äöü dsjhf ds()jdfj
        zu: äüü d_0


        ... ne das wars dann also nich Trotzdem danke
        Don't dream your life but live your dream
        (c)DJ Species ;-)

        Kommentar


        • #5
          Warst voll knapp dran, aber leider, knapp daneben ist halt auch daneben
          PHP-Code:
          $sz1=array(" ","ä","ö","ü","/","\\","\"","'","<",">","!","%","&","+","~");
          $sz2=array("_","ae","oe","ue","","","","","","","","","","","");
          for (
          $c=0$c<=14$c++) {
             
          $trackname str_replace ($sz1[$c], $sz2[$c], $trackname);

          Macht aus "äöü dsjhf ds()jdfj" -> "_aeoeue_dsjhf_ds()jdfj"

          Kommentar


          • #6
            hehe danke ... das scheint ein eindeutiges Sympthom von Übermüdung oder ähnlichem zu sein
            Don't dream your life but live your dream
            (c)DJ Species ;-)

            Kommentar


            • #7
              Das seh ich schon bei der Kombination "äöü dsjhf ds()jdfj". Bist wohl mit dem Kopf dabei auf die Tastatur gefallen

              Kommentar


              • #8
                ähhhhhhhm Prob:

                hab das ganze noch mal so erweitert, daß runde klammern ( ) gelöscht werden ... aber das wird einfach ignoriert ....
                Don't dream your life but live your dream
                (c)DJ Species ;-)

                Kommentar


                • #9
                  $<=14 wird Dein Problem sein

                  hehehehehe - mußt schlafen gehen!

                  <?
                  $trackname = "äöü dsjhf ds()jdfj";
                  $sz1=array(" ","ä","ö","ü","/","\\","\"","'","<",">","!","%","&","+","~",")","(");
                  $sz2=array("_","ae","oe","ue","","","","","","","","","","","","","");
                  for ($c=0; $c<count($sz1); $c++) {
                  print "$sz1[$c]<br>";
                  $trackname = str_replace ($sz1[$c], $sz2[$c], $trackname);
                  }
                  print $trackname;

                  Kommentar

                  Lädt...
                  X