Should be `<?php if ($next) : ?>` - i.e. missing space.