PHP Multiple choices


Total available count: 47
Subject - PHP Frameworks
Subsubject - PHP

What is the function to be used to get the image height in PHP?


 

 

 

 



B


Solution:-

PHP provides various functions and DLL to extract image properties from an image.
These functions are,
1. imagesx() and imagesy()
2. getimagesize()
3. exif_read_data()

The imagesy() is the function to be used to get the image height in PHP. It returns the height of the image or FALSE on errors.

Syntax

imagesy(img)

The following is an example:

<?php
  $img = imagecreatetruecolor(450, 250);
  echo imagesy($img);
?>

Output
The following is the output:

250




Next 5 multiple choice(s)

1

What is the function to be used to get the image width in PHP?

2

What is the function to be used to get the image size in PHP?

3

What is the use of the function ‘imagetypes()’ in PHP?

4

Which library is needed to be able to use the image function in PHP?

5

Which methods are needed when passing values through a form or an URL in PHP?

Comments