Posts Tagged with 'PHP'

PHP | What are cookies in PHP? A cookie is a small piece of information store by the browser on the client location and sent to the server with every request. It stores a limited amount …

Last updated 5 years, 7 months ago | 1156 views

Tags:- PHP

PHP | The maximum size of a file that can be uploaded using PHP The default maximum size of a file that can be uploaded using PHP is 2MB. upload_max_filesize = 2M; and we can …

Last updated 5 years, 7 months ago | 1338 views

Tags:- PHP

PHP | max_execution_time directive in php.ini file By changing the value of  max_execution_time in the php.ini file max_execution_time = 30; // in second   By default, the maximum execution time for PHP scripts is set to …

Last updated 5 years, 7 months ago | 1253 views

Tags:- PHP

Bellow code is used for the same $date1 = date(‘Y-m-d’); $date2 = ‘2006-08-15’; $days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24); echo $days;  

Last updated 5 years, 7 months ago | 1005 views

Tags:- PHP

PHP | Find the number of rows in a result set Bellow code is use for the same $sql = "SELECT * FROM table1"; $result = mysql_query($sql, $db_link); $num_rows = mysql_num_rows($result); echo $num_rows;  

Last updated 5 years, 7 months ago | 1288 views

Tags:- PHP PHP-MySQL

Predefined classes in PHP are: Directory stdClass __PHP_Incomplete_Class exception php_user_filter

Last updated 5 years, 7 months ago | 1820 views

Tags:- PHP

PHP | Count number of elements in an array There are two ways to find the number of elements in an array: 1. sizeof($arr), This function is an alias of count() echo sizeof($arr); 2. count($arr) echo …

Last updated 5 years, 7 months ago | 1253 views

Tags:- PHP

PHP-MYSQL |  mysqli_fetch_assoc() VS  mysqli_fetch_array() mysqli_fetch_assoc() function fetch a result row as an associative array where as mysqli_fetch_array() function fetch a result row as an associative array, a numeric array, or both.       mysqli_fetch_assoc() The mysqli_fetch_assoc() …

Last updated 5 years, 7 months ago | 5142 views

Tags:- PHP PHP-MySQL

PHP-MYSQL |  mysqli_fetch_object () VS  mysqli_fetch_array() mysqli_fetch_object()  fetch a result row as an object where as mysqli_fetch_array()  fetch a result row as an associative array, a numeric array, or both.       mysqli_fetch_object() The mysqli_fetch_object() function returns …

Last updated 5 years, 7 months ago | 3514 views

Tags:- PHP

PHP-MYSQL |  Fetch Recoards From MySql table There are 4 ways: mysqli_fetch_row() - Get a result row as an enumerated array mysqli_fetch_array() - Fetch a result row as an associative array, a numeric array, or both mysqli_fetch_object() …

Last updated 5 years, 7 months ago | 7621 views

Tags:- PHP PHP-MySQL

PHP-MySQL | Transaction with commit and rollback try { // First of all, let's begin a transaction $db->beginTransaction(); // A set of queries; if one fails, an exception should be thrown which we are handling at …

Last updated 5 years, 7 months ago | 732 views

Tags:- PHP PHP-MySQL

session_id() function There is a function session_id() in php which is use to get and/or set the current session id. string session_id ([ string $id ] ) for getting session id in php we have to …

Last updated 5 years, 7 months ago | 2999 views

Tags:- PHP

PHP | What are default session times in PHP? By default, session variables last until the user closes the browser or leaves the site otherwise most of the server terminates the session variable if you …

Last updated 5 years, 7 months ago | 1313 views

Tags:- PHP

PHP | strip_tags() function strip_tags() function is use to remove HTML, XML, and PHP tags from string. The function provides you the ability to remove tags from strings. You can also ignore certain tags by …

Last updated 5 years, 7 months ago | 1577 views

Tags:- PHP

PHP | unset() function The function unset() is an inbuilt function in in php which is use to delete variable. unset($var) or void unset ( mixed $var [, mixed $... ] ) Note: we can …

Last updated 5 years, 7 months ago | 1315 views

Tags:- PHP