mysql_fetch_array – Fetch a result row as an associative array, a numeric array, or both
mysql_fetch_assoc – Fetch a result row as an associative array
mysql_fetch_object – Fetch a result row as an object
mysql_fetch_row —- Get a result row as an enumerated array… Read more
What are the encryption functions in PHP?
CRYPT()
MD5()… Read more
How can we get the properties (size, width, height) of an image using php image functions?
To know the image size use getimagesize() function
To know the image width use imagesx() function
To know the image height use imagesy() function… Read more
How can we increase the execution time of a php script?
By the use of void set_time_limit(int seconds)
Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the php.ini. If seconds is set to … Read more
How to set cookie in php ?
setcookie(‘variable’,’value’,’time’);
variable – name of the cookie variable
value – value of the cookie variable
time – expiry time
Example: setcookie(‘Test’,$i,time()+3600);
Test – cookie variable name
$i – value of the variable ‘Test’
time()+3600 – denotes that the cookie will expire after an one hour… Read more
How to reset/destroy a cookie ?
Reset a cookie by specifying expire time in the past:
Example: setcookie(‘Test’,$i,time()-3600); // already expired time
Reset a cookie by specifying its name only
Example: setcookie(‘Test’);… Read more
How can we find in which image types are supported by the current PHP installation ?
Using imagetypes() function to find out what types of images are supported in your PHP engine.
imagetypes() -Returns the image types supported by the current PHP installation.
This function returns a bit-field corresponding to the image formats supported by the version of GD linked into PHP. The following bits are … Read more
How many ways can we get the value of current session id?
session_id() returns the session id for the current session.… Read more
What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems?
All of those are open source resource. Security of Linux is very more than windows. Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. Php is more faster that asp or any other scripting language.… Read more
What are the features and advantages of Object oriented programming?
One of the main advantages of OO programming is its easy of modification; objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated … Read more