[insert_php]

$brain_id = $_GET[‘brain_id’];
$label = $_GET[‘label’];

$firstalign_folder = ‘wp-content/registration/FirstAlign/M’.$brain_id.’_’.$label;

$new_images = array();
$scan = scandir($firstalign_folder);
foreach($scan as $file){
if (!is_dir($file)){
$new_images[] = $file;
}

}
sort($new_images, SORT_NATURAL | SORT_FLAG_CASE);
$leg_image = count($new_images);

echo do_shortcode(“

Small First Alignment TIF Images

“);

foreach($new_images as $image) {
$image_number = explode(‘_’, $image);
if(is_numeric($image_number[0])){
echo ‘

‘;
echo ‘‘.$image_number[0].’‘;
echo ‘‘;
echo ‘

‘;
}
}

[/insert_php]

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *