Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Server Side Programming Articles
Page 1062 of 2109
filter_id() function in PHP
The filter_id() function returns the filter ID of a provided filter name. This is useful when you need to work with filter IDs directly or verify that a filter exists. Syntax filter_id(filtername) Parameters filtername − The name of filter to get the ID from. Return Value The filter_id() function returns filter ID on success or FALSE, if the filter does not exist. Example Here's how to get filter IDs for all available filters ? int = 257 boolean = 258 float = ...
Read Morefilter_has_var() function in PHP
The filter_has_var() function is used to check whether a variable of a specified input type exists or not. This is particularly useful for validating user input from forms, URLs, and other sources. Syntax filter_has_var(type, var) Parameters type − Specifies the input type to check. Available options are: INPUT_GET − GET variables INPUT_POST − POST variables INPUT_COOKIE − COOKIE variables INPUT_SERVER − SERVER variables INPUT_ENV − Environment variables var − The name of the variable to check for existence Return Value Returns true if the variable exists, false ...
Read Moretan() function in PHP
The tan() function in PHP returns the tangent of a specified value in radians. It's a built-in mathematical function that calculates the ratio of sine to cosine for a given angle. Syntax tan(value) Parameters value − A numeric value representing an angle in radians (float or integer) Return Value The tan() function returns a float representing the tangent of the specified angle. Returns NaN for invalid inputs. Basic Examples Here are some basic examples demonstrating the tan() function ? 01.55740772465491 ...
Read Moresqrt() function in PHP
The sqrt() function in PHP returns the square root of a number. It accepts any numeric value and returns a float representing the square root. Syntax sqrt(num) Parameters num − The number for which you want to find the square root. Can be an integer or float. Return Value The sqrt() function returns the square root of the specified number as a float. For negative numbers, it returns NAN (Not a Number). Examples Basic Square Root Finding the square root of a perfect square ? ...
Read Moresinh() function in PHP
The sinh() function returns the hyperbolic sine of a number, which is mathematically equivalent to (exp(num) - exp(-num))/2. This function is commonly used in mathematical calculations involving hyperbolic trigonometry. Syntax sinh(num) Parameters num − The number for which you want to calculate the hyperbolic sine. The value should be in radians. Return Value The sinh() function returns a float representing the hyperbolic sine of the given number. Example 1 Basic usage with simple numeric values ? 0 1.1752011936438 -1.1752011936438 Example ...
Read Morezip_read() function in PHP
The zip_read() function reads the next entry in a ZIP file archive. It iterates through entries sequentially, returning a resource for each file or directory found within the archive. Syntax zip_read(zip) Parameters zip − The zip resource to read, opened with zip_open() Return Value The zip_read() function returns a resource containing a file within the zip archive on success, or FALSE when there are no more entries to read. Example The following example demonstrates reading entries from a ZIP file. We have a zip file "new.zip" with the ...
Read Morezip_open() function in PHP
The zip_open() function opens a ZIP file for reading in PHP. It returns a resource handle on success or FALSE on failure. This function is part of PHP's ZIP extension and allows you to read the contents of ZIP archives. Syntax zip_open(filename) Parameters The function accepts a single parameter ? filename − The path to the ZIP file that needs to be opened for reading. Return Value Returns a ZIP file resource handle on success, or FALSE on failure (e.g., if the file doesn't exist or is not a ...
Read Morezip_entry_read() function in PHP
The zip_entry_read() function is used to get the contents from an open zip archive file entry in PHP. Syntax zip_entry_read(zip_entry, len) Parameters zip_entry − The zip entry resource. Required. len − The length in bytes to read. Optional, defaults to 1024. Return Value Returns the contents from an open zip archive file entry as a string. Returns FALSE on failure. Example Let's say we have a zip file "one.zip" containing a single file "detail.txt" with the following content − Asia is a continent! Here's ...
Read Morezip_entry_open() function in PHP
The zip_entry_open() function is used to open a zip archive entry for reading. This function is part of PHP's legacy Zip extension and allows you to access individual files within a ZIP archive. Syntax zip_entry_open(zip_file, zip_entry, mode) Parameters zip_file − The zip file resource to be read zip_entry − The zip entry resource to open mode − The type of access needed for zip archive (e.g., "r" for read, "rb" for read binary) Return Value The zip_entry_open() function ...
Read Morezip_entry_name() function in PHP
The zip_entry_name() function returns the name of a directory entry inside a ZIP archive. This function is part of PHP's ZIP extension and works with ZIP archives opened using zip_open(). Syntax zip_entry_name(zip_entry) Parameters zip_entry − A directory entry resource from a ZIP file, obtained using zip_read() on an archive opened with zip_open(). Return Value The zip_entry_name() function returns the name of the ZIP archive entry as a string on success, or FALSE on failure. Example The following example demonstrates how to list all file names in a ZIP ...
Read More