How can the getimagesize() function be used in a PHP script to display enlarged thumbnails in their original size?

To display enlarged thumbnails in their original size using the getimagesize() function in a PHP script, you can first retrieve the dimensions of the image using getimagesize(). Then, you can use these dimensions to display the image in its original size by setting the width and height attributes in the HTML img tag.

<?php
// Path to the image file
$image_path = 'path/to/image.jpg';

// Get the dimensions of the image
list($width, $height) = getimagesize($image_path);

// Display the image in its original size
echo '<img src="' . $image_path . '" width="' . $width . '" height="' . $height . '">';
?>