PHP Tutorial - PHP is_link() Function






Definition

The is_link() function checks whether the specified file is a link.

Syntax

PHP is_link() Function has the following syntax.

is_link(file)

Parameter

ParameterIs RequiredDescription
fileRequired.File to check

Return

This function returns TRUE if it is a link.

Note

The result of this function are cached. Use clearstatcache() to clear the cache.





Example


<?php
$link = "images";
if(is_link($link)){
  echo ("$link is a link");
}else{
  echo ("$link is not a link");
}
?>

The code above generates the following result.