from the php manual, when you see something in brackets like that, it means its an optional parameter; you're not actually supposed to put it between brackets. Change
$width = substr($resolution, 1[,4]);
to
$width = substr($resolution, "1", "4");
Cgraz