[PHP] String aufteilen..

Dieses Thema im Forum "Webentwicklung" wurde erstellt von Mr.Smoke, 14. April 2008 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 14. April 2008
    String aufteilen..

    HI..
    Ich hab als beispiel so einen String:

    /2008/cat1/subcat1/subsubcat6


    das ganze will ich jetzt in ein array speichern und zwar so:

    [0] => /2008
    [1] => /2008/cat1
    [2] => /2008/cat1/subcat1
    [3] => /2008/cat1/subcat1/subsubcat6

    Ich hab grad i-wie ne Blockade und bekomme es net hin

    help me!

    bw ist sicher....
     
  2. 14. April 2008
    AW: String aufteilen..

    PHP:
    <? php $string  '/bla/blu/bli' ;
    $ex  explode ( "/" , $string );
     
    $str  '' ;
    for(
    $i = 0 ; $i < count ( $ex ); $i ++) {
     
    $str  .=  '/' . $ex [ $i ];
     
    $out [ $i ] =  $str ;
    }
    ?>
    ? ungetestet
     
  3. 14. April 2008
    AW: String aufteilen..

    Geht =)...
    Dankeöööö

    bw raus
     
  4. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.