[insert_php]
$brain_id = $_GET[‘brain_id’];
$label = $_GET[‘label’];
$firstalign_folder = ‘wp-content/registration/Repair/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(“
Sagittal and Transverse TIF Images
foreach($new_images as $image_2) {
$image_name = explode(‘_’, $image_2);
if(strpos($image_2, ‘png’)){
echo ‘
‘;
}
}
echo do_shortcode(“
Small Repair TIF Images
foreach($new_images as $image) {
$image_number = explode(‘_’, $image);
if(is_numeric($image_number[0])){
echo ‘
‘;
}
}
[/insert_php]
Leave a Reply
Want to join the discussion?Feel free to contribute!