With the very good ones to the community, I have the following question, I am working on php and mysql. I need to change a part of a
<img src="http://localhost/upload/foto.jpg" width="259" height="194" />
I want to remove the width and the height from the img, because that will be handled from the css code, so that it is responsive and fits freely on the page. Like when you create a new article sometimes there are several images within the same article $ _ POST ['article'] , try to do it with explode but it does not work for me, and the same I would like to do with the
If you could help me I would appreciate it
<form method="POST">
<textarea name="articulo"></textarea>
</form>
therefore everything written in the textarea will be under tinymce.
<?php
$articulo=$_POST['articulo'];
//reemplazo algunos caracteres
$articulo=str_replace('<img src="../..', '<img src="http://localhost/", $articulo);
example: the $ article would come with the following - >
<p>este es un articulo para mostrar <img src="localhost/upload/foto.jpg" width="259" height="194" /></p>
here I need to do the elimination of the witdh and height that comes in the etiquieta