SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)

    Anyway to exclude a portion of a PHP include?

    Good morning,

    I would like to use a php include here. But exclude (not show) a large portion of it on certain pages. And only show a specific to each page portion. Anyway to do this with php aside from display none css? Thanks.

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,403
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    You could put a variable on each page and check what the variable is and only show the relavant code.

    You could read the page name from the URL and again only show the relavant result from the include.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •