Kenny Kiriga Kenny Kiriga - 6 days ago 4x
HTML Question

Echoing variable in php

Essentially I am trying to have a heading using what is below. Not sure what is going on but nothing happens. Even when I do something as simple as echo "hello" there instead of the 2 variables.

<h1><?echo "$info[0] ($info[1])";?></h1>


You can use <?= ?> shorthand for echoing variables and the code should look like,

<h1><?= "$info[0] ($info[1])"; ?></h1>