$width = 100;$height = 50;$texto = "width=\"xxx\" height=\"yyy\"";$var = str_replace( "xxx", $width, $texto );$var = str_replace( "yyy", $height, $var );echo $var;