corrected undefiend variable error

Undefinded variable $i on line #173. Added 'php' on lines 163 and 175