<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1012931" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1012931</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Wasteful Work</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/need-some-conditional-help#comment-1075184</link>
    <description> &lt;p&gt;You might think it would be a good idea to do this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$a = &amp;quot;jeff&amp;quot;;&lt;br /&gt;$b = &amp;quot;mary&amp;quot;;&lt;br /&gt;$c = &amp;quot;anna&amp;quot;;&lt;br /&gt;$all = join &amp;quot;&amp;quot;, map &amp;quot;!$_&amp;quot;, $a, $b, $c;&lt;br /&gt;# $all is now &amp;quot;!jeff!mary!anna&amp;quot;&lt;br /&gt;# we assume there are no !&amp;#039;s in the $a, $b, $c variables&lt;br /&gt;&lt;br /&gt;if ($all =~ /![aeiou]/) {&lt;br /&gt;&amp;nbsp; print &amp;quot;at least one of the names starts with a vowel\n&amp;quot;;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;But this does more work than is needed.  You&#039;ve just gone through each of your variables TWICE BEFORE you get to the regular expression!  Compare that to:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;for ($a, $b, $c) {&lt;br /&gt;&amp;nbsp; if (/^[aeiou]/) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print &amp;quot;at least one of the names starts with a vowel\n&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; last;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
&lt;p&gt;That is far more efficient.&lt;/p&gt;
 </description>
     <pubDate>Tue, 05 Dec 2000 19:58:53 +0000</pubDate>
 <dc:creator>japhy</dc:creator>
 <guid isPermaLink="false">comment 1075184 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/need-some-conditional-help#comment-1074993</link>
    <description> &lt;p&gt;depends on how many variable u have.  if u have tons u may want to use foreach.&lt;/p&gt;
 </description>
     <pubDate>Sun, 03 Dec 2000 07:25:21 +0000</pubDate>
 <dc:creator>fairhousing</dc:creator>
 <guid isPermaLink="false">comment 1074993 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/need-some-conditional-help#comment-1074983</link>
    <description> &lt;p&gt;I don&#039;t thinks so.&lt;br /&gt;
I think you can only look for two strings inside of one, not one string inside of two.&lt;br /&gt;
Make sense?&lt;/p&gt;
 </description>
     <pubDate>Sun, 03 Dec 2000 05:46:04 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1074983 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
