<?php header("Content-Type: image/svg+xml"); ?> <svg> <rect width="100" height="25" x="30" ry="12" y="40" fill="black" /> <?php $myheight=100; echo "<rect width=\"100\" height=\"$myheight\" x=\"30\" ry=\"12\" y=\"40\" fill=\"black\" />"; ?> </svg>