Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

526
Vistas
parse error: parse error

I was messing around with the output echo that gave the results of the query trying to figure out how to make the dog breed bold and now I am getting this

-Parse error: parse error in /Library/WebServer/Documents/dogs.php on line 22

I am pulling my hair out on this, if anyone can help with either the parse error or how to make the dog breeds bold I would be in your debt.

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT b.dogbreed ,(SELECT GROUP_CONCAT(DogName) FROM Names WHERE dogId=b.dogId ) as Dognames from breeds b";
$result = $conn->query($sql);

if ($result->num_rows > 0) {

    while($row = $result->fetch_assoc()) {
        echo . $row["dogbreed"].  " - " . $row["Dognames"]. "<br>";
    }
} else {
    echo "0 results";
}
$conn->close();
?>

</html>
over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

echo . $row["dogbreed"].  " - " . $row["Dognames"]. "<br>";

Take out the . after echo:

echo $row["dogbreed"] . " - " . $row["Dognames"] . "<br>";
over 4 years ago · Santiago Trujillo Denunciar

0

The tag you would be looking for in html to make it bold is this:

<strong>Text</strong>

Otherwise, if you could include more of your code and the lines, it would be of better help with the current error.

over 4 years ago · Santiago Trujillo Denunciar

0

To make any text bold in echo, simply add echo "<strong>" . $row ["dogbreed"] . "</strong>".

This way you can make any part of text bold.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda