Buy Now
Sign in

display photos from Database: loop or foreach?

Fredolino , February 10 2021, 18:24
Fredolino 670
February 10 2021, 18:24 #395921
Hi,
how can i display photos in my view table "beob_arten_list"
BeoArt.photo:{view:php_images}

Maby?
{view:php_images}:

$photo = 3; // this is the number of photo you want to show
for ($i=0; $i <= $photo ; $i++) {
$photo = $photo[$i];
echo "<img src='components/com_chronoforms6/chronoforms/uploads/$photo.jpg' style='max-width:50px' /> ";
}
Debugger
 [var] => Array
(
[0] => Array
(
[BeoArt] => Array
(
[beo_art_id] => 3061
[spec] => Archiearis parthenias (LINNAEUS, 1761) Großer Jungfernkind
[beof_id] => 1371
[anzahl] => 1
[haufigkeit] => o. A.
[stadium] => Imago
[geschlecht] => o. A.
[bestimmung] => Äußere Merkmale
[bemerkung] =>
[photo] => ["habitat_01.jpg","habitat_02.jpg","habitat_03.jpg","habitat_04.jpg"]
[datenweitergabe] =>
[state] => 0
)

[Artname] => Array
(
[warnung] => 0
)

)

)

)