php include help

Discussion in 'PHP' started by farhang, Jan 1, 2008.

  1. #1
    Hello,

    I have been customizing this script and just got stuck on this last thing.

    I have this code what it does is outputs a "GALLERYTITLE"

    
      <?php
    if ( $aGalleyIndex = getParentAlbums()) {
    echo $aGalleyIndex[0]->getTitle();
    } else {
    printAlbumTitle();
    }
    ?>
    
    Code (markup):
    What i want to do is take that "GALLERYTITLE" and put in a include right next to that code

     <?php include('albums/GALLERYTITLE/info.txt'); ?> 
    Code (markup):
    Anyone can help ?

    Thanks
     
    farhang, Jan 1, 2008 IP
  2. farhang

    farhang Active Member

    Messages:
    383
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Never mind i figured it out :p

    
     <?php
    if ( $aGalleyIndex = getParentAlbums()) {
     
    $blah=$aGalleyIndex[0]->getTitle();
    } else {
    $blah=getAlbumTitle();
    }
    include('albums/'. $blah .'/info.txt');
    ?>
    
    
    Code (markup):
     
    farhang, Jan 1, 2008 IP
  3. msaqibansari

    msaqibansari Peon

    Messages:
    84
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    funnnnnnnnnnnnnnnnnnnnny
     
    msaqibansari, Jan 1, 2008 IP
  4. kendo1979

    kendo1979 Peon

    Messages:
    208
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    that's a good one, nice to hear someone solve their own problem, which means that he doesn't just let other think for him.
     
    kendo1979, Jan 1, 2008 IP