How to show x number image random in acf
i have add code number number image random in acf don't show image
<?php
$images = get_field('khach_hang', 'option');
$rand = array_rand($images, 1);
if( $images ): ?>
<?php
$i = 0;
foreach( $images as $image ):
if ($i <= 19 ) { ?>
<img class="khac_hang_item" src="<?php echo $image[$rand]['url']; ?>" alt="<?php echo $image[$rand]['alt']; ?>" />
<?php $i++; } endforeach; ?>
<?php endif; ?>
I have 20 url image : <img class="khac_hang_item" src="" alt="" />
Any help greatly, Thanks