I have this php line:
echo '<a href="?p=ultimasnoticias&pagina='.$i.'">'.$i.'</a>';
I need to put .$i.
between <a>.$i.</a>
in my html script, eg:
<nav>
<ul>
<li>
<a>.$i.</a>
</li>
How do I do this?
I have this php line:
echo '<a href="?p=ultimasnoticias&pagina='.$i.'">'.$i.'</a>';
I need to put .$i.
between <a>.$i.</a>
in my html script, eg:
<nav>
<ul>
<li>
<a>.$i.</a>
</li>
How do I do this?
Easy.
<nav>
<ul>
<li>
<?php echo '<a href="?p=ultimasnoticias&pagina='.$i.'">'.$i.'</a>'; ?>
</li>
Another option would be:
<nav>
<ul>
<li>
<a href="?p=ultimasnoticias&pagina=<?php echo $i; ?>"><?php echo $i; ?></a>
</li>
I hope I have helped.
To decrease the code can also be:
<nav>
<ul>
<li>
<a href="?p=ultimasnoticias&pagina=<?=$i?>"><?=$i?>
</a>
</li>