0
to using a theme that currently has the portfolio option, but it does not natively offer an option to add link the added images.
Request to modify the file. PHP, but I can’t find a way to feed one image after another, because it’s assigning the same value to all in order to concatenate
Follow the commands:
ARRAY
$name = $arrayName = array (
'1' => 'https://google.com',
'2' => 'https://bing.com', );
Feed
<a href="<?php
for($i=0;$i<100;$i++){
echo $name[$i];}
I have tried several ways but all concatenate the links.
Result so far:
I realized that there is a variable $id where the id of the images is shown.
Don’t use the
for
within the attributehref
. Use it this way, for example:<?php for (...) ?><a href="<?php echo $arr[$i]['href'] ?>"><?php echo $arr[$i]['text'] ?></a>
– Valdeir Psr
Oks, but regarding the development of the food code without concatenating, you have some idea of what it would be like ?
– Jonathan Barros Franco
The way I commented, you would stop concatenating. I think your doubt is how to make the addition of link dynamically.
– Valdeir Psr
Yes, exactly, because I’m trying to assign a different link to each image
– Jonathan Barros Franco