Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

foreach sort orderby php

<?php array_multisort(array_column($mediaRecords, "date"), SORT_ASC, $mediaRecords); ?>
<?php foreach ($mediaRecords as $record): ?>
  <?php foreach ($record['media'] as $index => $upload): ?>
  <img src="<?php echo $upload['thumbUrlPath2'] ?>" alt="<?php echo htmlencode($record['title']) ?>" />
  <?php endforeach; ?>
<?php endforeach ?>
 
PREVIOUS NEXT
Tagged: #foreach #sort #orderby #php
ADD COMMENT
Topic
Name
7+4 =