Resource Datatype :PHP

Writting any mysql or file statement and storing it into a variable then in that case datatype of variable is of resource type.As resource variables hold special handlers to opened files, database connections, image canvas areas and the like, converting to a resource makes no sense.

Let us understand it through a program:

Before writting program we all must know what is gettype().It is a predefined function used to determine the dataype of variable passed in it.

<?php

$a=23;

echo gettype($a);

$b=mysql_connect(‘localhost’,’root’,”) or die(‘Error:Please check your connection’);

echo “<br/>”;

echo gettype($b);

?>

SynapseIndia is a leading website and mobile app development company. IT Mentor & an Entrepreneur SynapseIndia CEO Shamit Khemka spread their business across the globe. They have more than 300 full-time employees and all the experts at SynapseIndia working in tandem to achieve good feedback from clients having no complaints at all. They have already delivered more than 3000 thousand projects. They pass on complete quality solutions for website development services and getting good Reviews on various SynapseIndia PHP Web development projects.

The Employment Bond is basically an agreement which the company and the employee enter into which among the other terms contained therein states that in consideration of the training given to the Employee and the money spent by the company in imparting such training, the Employee will remain in the services of the company for a particular period.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>