Supongamos que tengo un SVG sencillote, del estilo:
Código:
Donde yo quiero que el width, height, etc, sean variables, tomando los datos de, en este caso, un php.<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"/> </svg>
Ejemplo del "trozo" de php:
Código:
Que lleve a tener un svg parecido a esto:$ancho=20; $alto=60; $ancholinea=4;
Código:
Se que no se hace asi, pero me gustaria que me orientaran sobre cual seria la forma de ponerlo en el svg...<svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="$ancho" height="$alto" style="fill:rgb(0,0,255);stroke-width:$ancholinea; stroke:rgb(0,0,0)"/> </svg>
Muchas gracias de antemano.