CS inaccuracy here. Should be:

```php
for($start=0,$i=1;$i<$n;$i++)
{
```

Instead of:

```php
for($start=0,$i=1;$i<$n;$i++){
```