Fury-Tech Logo
Home  News  Articles  Reviews  Guides  Resources  Forums 
Fury-Tech // Technology news, hardware and game reviews, guides, articles, and resources   
Search:



There are currently 0 members and 8 guests browsing on Fury-Tech.


Join our community in the tech forums for uncut technology discussion.

is_resource


(PHP 4 , PHP 5)

is_resource --  Finds whether a variable is a resource

Description

bool is_resource ( mixed var )

is_resource() returns TRUE if the variable given by the var parameter is a resource, otherwise it returns FALSE.

Example 1. using is_resource()

<?php

$db_link
= @mysql_connect('localhost', 'mysql_user', 'mysql_pass');
if (!
is_resource($db_link)) {
    die(
'Can\'t connect : ' . mysql_error());
}

?>

See the documentation on the resource-type for more information, and get_resource_type().

Join our community in the tech forums for uncut technology discussion.



©2007 Fury-Tech | Tech News, Hardware Reviews, Forums, Guides, and more.

Web Hosting by Intavant

Tech News | Articles | Reviews | Guides | Resources | Tech Forums