WordPress.org

Ready to get started?Download WordPress

Forums

foreach () problem (6 posts)

  1. dommega
    Member
    Posted 9 years ago #

    Everytime I try to combine two variables in the foreach() command I get an error. This is what I am trying to do: foreach ($postitle && $pagecontent as $page):

    How do I get it to work?

  2. skippy
    Member
    Posted 9 years ago #

    what specifically are you trying to accomplish?

  3. Cypher
    Member
    Posted 9 years ago #

    This is the official usage of the foreach() command. Is what you are doing even legal?

    http://us3.php.net/foreach

    Regards

  4. dommega
    Member
    Posted 9 years ago #

    define legal? funny question. I am trying to adjust the include_page plugin to show the page titles as well.

  5. Cypher
    Member
    Posted 9 years ago #

    Legal is a PHP coding sense not Police sense. :)

  6. ColdForged
    Member
    Posted 9 years ago #

    Looking at the plugin code, you don't need to modify the foreach at all, you'll modify the echo line and you'll need to modify the SELECT call from the database. To be honest, though, it sounds like you may be over your head here.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.