<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Skip a word</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Skip-a-word-78657</link>
        <description></description>
        <pubDate>Sat, 07 Mar 2026 09:57:48 -0800</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Skip-a-word-78657" rel="self" type="application/rss+xml" />

                <item>
          <title>Skip a word</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230156#post2230156</link>
          <description><![CDATA[<p>Absolutely spot on!  Worked great - thanks!</p>]]></description>
          <pubDate>Wed, 10 Apr 2013 07:47:30 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230156#post2230156</guid>
        </item>
                <item>
          <title>Skip a word</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230155#post2230155</link>
          <description><![CDATA[<p>Hi,</p>
<p>An example here:</p>
<p><code>$str = maxWords($record['title'], 10);<br /> $newTitle = explode(" ", trim($str), 2);<br /><br />$str1 = '&lt;b style="color:red"&gt;' . $newTitle[0] . '&lt;/b&gt;';<br /><br />if (isset($newTitle[1])) { $str2 = '&lt;i&gt;' . $newTitle[1] . '&lt;/i&gt;'; }<br /> else { $str2 = ''; }<br /><br />$newTitle = $str1 . $str2;<br /> echo $newTitle;</code></p>
<p>Hope that helps!</p>
<p>Djulia</p>]]></description>
          <pubDate>Wed, 10 Apr 2013 01:29:06 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230155#post2230155</guid>
        </item>
                <item>
          <title>Skip a word</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2230154#post2230154</link>
          <description><![CDATA[<p>I want to be a little creative with some CSS and have text that shows the first word in a different color.  I have established two CSS Classes for the colors and divided up the "Title" using the MaxWords script</p>
<p><code>  function maxWords($textOrHtml, $maxWords) { <br />  $text = strip_tags($textOrHtml); <br />  $words = preg_split("/\s+/", $text, $maxWords+1); <br />  if (count($words) &gt; $maxWords) { unset($words[$maxWords]); } <br />  $output = join(' ', $words); <br /> <br />  return $output; <br />  } <br /></code></p>
<p>and then in the page code</p>
<p><code>&lt;span class="red-title"&gt;&lt;?php echo maxWords($record['title'], 1) ?&gt;&lt;/span&gt; &lt;span class="black-title"&gt;&lt;?php echo htmlencode($record['title']) ?&gt;&lt;/span&gt;</code></p>
<p>Now, the problem I face with that is that it shows the first word over again in the second instance.  I am thinking I need to skip the first word of the title in the second instance so my titles show up like this:</p>
<p><strong><span style="color:#ff0000;">Service</span> and Support</strong></p>
<p>Any ideas on how this could be accomplished?</p>
<p>I have tried using (with no luck as this only removes the first letter)</p>
<p><code>&lt;?php echo substr($record['title'], 1) ?&gt;</code></p>
]]></description>
          <pubDate>Tue, 09 Apr 2013 21:20:24 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2230154#post2230154</guid>
        </item>
              </channel>
    </rss>
  