How can PHP be used to determine the width and height of an image?

To determine the width and height of an image using PHP, you can use the `getimagesize()` function. This function returns an array containing the width, height, type, and attributes of the image. By accessing the width and height values from the array, you can easily determine the dimensions of the image.

$imagePath = 'path/to/your/image.jpg';
$imageSize = getimagesize($imagePath);
$imageWidth = $imageSize[0];
$imageHeight = $imageSize[1];

echo "Image width: $imageWidth pixels <br>";
echo "Image height: $imageHeight pixels";