<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>foreach query</title>
        <link>https://interactivetools.com/forum/forum-posts.php?foreach-query-70119</link>
        <description></description>
        <pubDate>Sat, 10 Oct 2026 16:16:30 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;foreach-query-70119" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [ross] foreach query</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2197876#post2197876</link>
          <description><![CDATA[Thanks Ross  - appreciated.<br />]]></description>
          <pubDate>Sat, 20 Jun 2009 16:51:28 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2197876#post2197876</guid>
        </item>
                <item>
          <title>Re: [isdoo] foreach query</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2197841#post2197841</link>
          <description><![CDATA[Hi there.<br /><br />Thanks for posting!<br /><br />Would something like this work:<br /><br />Latest &lt;?php echo $news1Record['league'] ?&gt; News<br /><br />It would just output whatever you have in that field. The only thing is that you would probably want to do a quick search and replace for the &quot;_&quot; to turn them into space:<br /><br /><code>Latest &lt;?php echo str_replace(&quot;_&quot;, &quot; &quot;, $news1Record['league']);  ?&gt; News</code><br />]]></description>
          <pubDate>Thu, 18 Jun 2009 14:54:21 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2197841#post2197841</guid>
        </item>
                <item>
          <title>foreach query</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2197813#post2197813</link>
          <description><![CDATA[Hi all,<br /><br />Can some kind person point me in the right direction.<br /><br />I have some php code...<br /><br /> <code>&lt;?php if ($news1Record['league'] == 'Premier_League'){<br />	echo &quot;&lt;h3&gt;Premier League News&lt;/h3&gt;&quot;;<br />}<br />elseif ($news1Record['league'] == 'United_Counties_Premier'){<br />	echo &quot;&lt;h3&gt;United Counties League News&lt;/h3&gt;&quot;;<br />}<br />elseif ($news1Record['league'] == 'Wessex_Premier'){<br />	echo &quot;&lt;h3&gt;Wessex League News&lt;/h3&gt;&quot;;<br />}<br />elseif ($news1Record['league'] == 'Western_Premier'){<br />	echo &quot;&lt;h3&gt;Western League News&lt;/h3&gt;&quot;;<br />}<br />else{<br />	echo &quot;&lt;h3&gt;Latest News&lt;/h3&gt;&quot;;<br />}<br />	 ?&gt; </code><br /><br />Which currently goes on for some 20 odd times.<br /><br />As I wish to do something similar with clubs, I do not really wish to input 1800 odd lines of code, so would like to use a foreach query to compose the code so that I can pull in various includes of external scripts (as well as the wording above, which is stored in  'leagues' database and 'league_name' table and 'leagues' database 'league_known' table.<br /><br />So say....<br /><br />elseif ($news1Record['league'] == 'Western_Premier'){<br />	echo &quot;&lt;h3&gt;Western League News&lt;/h3&gt;&quot;;<br /><br />is <br /><br />elseif ($news1Record['league'] == '$record['league_name']'){<br />	echo &quot;&lt;h3&gt;$record['league_known'] News&lt;/h3&gt;&quot;;<br /><br />Can some kind person point me in the right direction as to how the code is written for CMS builder so that it will go to the database and pull in the information.<br /><br />If I can get the above one working in code, then hopefully I can figure out the more complicated version.<br /><br />If not, I will ask for a price to code it for me (but as I do  not earn from the site, would like to try and do it myself if poss).<br /><br />Assuming that it is even possible.<br /><br />Thanks.<br />]]></description>
          <pubDate>Wed, 17 Jun 2009 12:50:44 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2197813#post2197813</guid>
        </item>
              </channel>
    </rss>
  