<?php
int imagesx ( GdImage $image )
where,
$image = The image identifier to retrieve the width
?>
<?php
$lang = 'en';
$tst_img = "png/PNG 006 01.png";
echo $tst_img; ?><br><br>Existing Image
<br><br><img src="<?php echo $tst_img; ?>"
alt="<?php echo $tst_img; ?>"><br><br>
<?php
$img01 = imagecreatefrompng($tst_img);
var_dump($img01);
echo '<br><br>';
$get_w = imagesx($img01);
$en = 'WIDTH: ';
echo $$lang . $get_w . ' px';
?>
<?php
$lang = 'en';
$tst_img02 = "gif/GIF 008 05.gif";
echo $tst_img02; ?><br><br>Existing Image
<br><br><img src="<?php echo $tst_img02; ?>"
alt="<?php echo $tst_img02; ?>"><br><br>
<?php
$img02 = imagecreatefromgif($tst_img02);
var_dump($img02);
echo '<br><br>';
$get_w = imagesx($img02);
$en = 'WIDTH: ';
echo $$lang . $get_w . ' px';
?>