I think we have it.
Here is the issue: The discussion from your particular weather office is using an "&&" *before* the word SYNOPSIS. E.g.:
000
FXUS63 KIND 032028
AFDIND
Area Forecast Discussion
National Weather Service Indianapolis IN
428 PM EDT Fri Nov 3 2017
.UPDATE...
-- Changed Discussion --
The AVIATION Section has been updated below.
-- End Changed Discussion --
&&
.SYNOPSIS...
Issued at 328 PM EDT Fri Nov 3 2017
So when $start and $end are calculated, $end ends up less than $start and when the substr call is made:
$discuss = substr($discussion, $start+0, ($end-1-$start)); // new text (too long to print in cell format)
since $end < $start, it is ignored and you get the whole remainder of the string.
So I modified the code like this:
$sstring = 'SYNOPSIS'; // start of synopis quick text
$estring = '&&'; // first divider
$start = strpos($discussion,$sstring); // starting position of where to keep
$synopsis = substr($discussion, $start); // new - covers case of where && in text before SYNOPSIS
$end = strpos($synopsis,$estring) + $start; // end of where to keep - covers case of where && in text before SYNOPSIS
// $end = strpos($discussion,$estring); // end of where to keep
$discuss = substr($discussion, $start+0, ($end-1-$start)); // new text (too long to print in cell format)
And using that I'm seeing the synopsis clipped out as it should be.
(Yet another piece of evidence that HTML scraping is error-fraught)..