there is no need to use `sprintf` here, you can do it with php itself: `"$attrName=\"$attrValue\""`