<?php include '../SQL/conexion.php'; $lvl=$_GET["lvl"]; $sql = "SELECT nombre, edad, comentario from respuesta where comentario like '% ".$_POST["Word"]." %' ORDER BY RAND() LIMIT 1;"; $result = $conn->query($sql); if (!empty($result)){ foreach ($result as $respuesta){ echo "<i class='fas fa-user text-gray-300'></i> <b>".explode(" ", trim($respuesta["nombre"]))[0]."</b>, ".$respuesta["edad"]." aƱos:<\"SEP\"><img style='height: 100% !important; float:right; margin-left: 15px !important;' src = 'http://dash.huellaporlapaz.mx/img/logos/Mi_Huella_I_UL.png' />".str_ireplace(" ".$_POST["Word"]." ", " <b><u>".strtoupper($_POST["Word"])."</u></b> ", $respuesta["comentario"]); } } ?>