PHP Code Cleanup (Multiple If, Else If, Else)
<p>I have this chunk of code.  It works, but I'm sure there is a simpler and more logical way of doing it.  And just to save questions, <code>$seriespart</code> instead of <code>$row["SeriesPart"]</code> is specific because of previous code.</p>

<pre><code>// normal titling convention is Number - Series - Series Part - Sermon
if ($row["Number"] &amp;&amp; $row["Series"] &amp;&amp; $row["SeriesPart"] &amp;&amp; $row["Sermon"]) $title = $row["Number"]." - ".$row["Series"]." - Pt. ".$seriespart." - ".$row["Sermon"];
    // but sometimes a series doesn't have sermon titles
    else if ($row["Number"] &amp;&amp; $row["Series"] &amp;&amp; $row["SeriesPart"]) $title = $row["Number"]." - ".$row["Series"]." - Pt. ".$seriespart;
        // series that are in process don't have product numbers
        else if ($row["Series"] &amp;&amp; $row["SeriesPart"] &amp;&amp; $row["Sermon"]) $title = $row["Series"]." - Pt. ".$seriespart." - ".$row["Sermon"];
            // but sometimes a series doesn't have sermon titles
            else if ($row["Series"] &amp;&amp; $row["SeriesPart"]) $title = $row["Series"]." - Pt. ".$seriespart;
                // and we don't want product singles just showing a sermon title (it should say S74 - Title as a distinction from other oddball sermons)
                // note the substr() as we want it to say S71 and not S0171
                else if ($row["Number"] &gt;= "0100" &amp;&amp; $row["Number"] &lt;= "0199") $title = "S".substr($row["Number"], 2)." - ".$row["Sermon"];
                    // just show the bloody sermon title already
                    else $title = $row["Sermon"];
</code></pre>

<p>We have a bunch of sermons.  Those sermons are, usually, part of a series.  If a series is finished, it will have a series number, series title, series part, and optionally sermon title, sermon part, subtitle, and subtitle part.  If a series isn't finished, there won't be a series number.  Sometimes, there is no sermon title.  If it's not part of a series, then it can be an actual product unto itself.  Other times, it's just an oddball sermon that isn't a part of anything.</p>

<p>Examples...</p>

<blockquote>
  <p>Made Healed (sermon only, not part of a series, oddball)</p>
  
  <p>S45 - Sucker Or Sower? (single that is a product)</p>
  
  <p>The Helper - Pt. 1 - Do You Need Help? (series in progress, no series number)</p>
  
  <p>0513 - Harden Not Your Heart - Pt. 2 (completed series, no sermon title)</p>
  
  <p>1101 - The Honor Of God - Pt. 11 - How God Honors Us - Pt. 5 - By Using Us - Pt. 3 (comleted series, sermon title - sermon part - subtitle - subtitle part)</p>
</blockquote>

<p>Any ideas on how to clean up the code so I don't have to keep repeating the same information with if, else if, else?</p>
