我得到了以下行:
$anuncios3 = "<a class=resize2 target=_blank href=../anuncios/conteo.php?thumbnail=$anuncios_general[2]>".$anuncios_general[3]."</a>"; //publicacion anuncio
我需要包含resize2类,因为它可以帮助我将文本放入表中,但php似乎没有将其考虑在内,就好像它不存在一样。
<style type="text/css" >
.resize2{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 20px;
}
</style>
对echo使用单引号,对html属性使用双引号。
$anuncios3 = '<a class="resize2" target="_blank" href="../anuncios/conteo.php?thumbnail='.$anuncios_general[2].'">'.$anuncios_general[3].'</a>';