Email is an integral part of any project or business. Nowadays, being quick and responsive is a huge value, especially when it comes to answering your customers. In a lot of cases, responsiveness and well-planned communication are the deciding factors that users take into consideration when making purchases. We will learn about php mail() function. … Continue reading PHP Mail
Category: Core PHP
Core PHP is a simple, bare-bones PHP programming language. It can be used to create web applications.
PHP provides a number of built-in math functions which help in performing several operations while dealing with mathematical data. It has nice support for mathematical processing. No installation is required to use these functions. Some examples of mathematical functions in PHP are as follows: FunctionDescriptionabs()Returns the absolute value of a numberacos()Returns the arccosine of a … Continue reading PHP Math Functions
Array sorting provides a way to organize data sets in either alphabetical order or in numbers, in an ascending or descending manner. PHP provides inbuilt functions to sort an array. Here are the list. sort() – sorts arrays in ascending orderrsort() – sorts arrays in descending orderasort() – sorts associative arrays in ascending order, according … Continue reading PHP Sorting Arrays
What is cURL: cURL is a PHP library and a command line tool (like wget) that helps you send files and also download data over HTTP and FTP. It supports proxies, you can transfer data over SSL connections, you can set cookies and even get files that are behind a login. cURL allows transfer of … Continue reading PHP cURL
Followings are some helpful codes in php: 1] Develop with error reporting enabled error_reporting ( E_ALL ) ; ini_set ( 'display_errors' , 1 ) ; 2] Prevents SQL injection $query_result = mysql_query ( "SELECT * FROM WHERE Ex_table ex_field = \" " . mysql_real_escape_string( $ ex_field ) . " \ " " ) ; 3] … Continue reading PHP Tips and Tricks
What is PHP Array Arrays are complex variables that allow us to store more than one value or a group of values under a single variable name. An array is an special variable which can hold more than one value at a time. So why we use array? we use array for to stores multiple … Continue reading PHP Array
What is PHP Filter PHP Filter is used to validate (check the valid format) and sanitize (remove unwanted data) the input data received from an external source. The external source can be a user input, output of a query evaluation, web service data, server variables, cookies, etc. There are two kinds of filters: 1.Validating filters: … Continue reading PHP Filter
Followings are useful string functions: 1. Strlen PHP has a predefined function to get the length of a string. Strlen() displays the length of any string. It is more commonly used in validating input fields where the user is limited to enter a fixed length of characters. Syntax: Strlen(string); Example: <?php echo strlen(“Welcome to PHP”);//will … Continue reading PHP String Functions
What is Object Oriented Programming? Object Oriented Programming (OOP) is a programming paradigm where the complete software operates as a bunch of objects talking to each other. An object is a collection of data and methods that operate on its data. Why OOP? The main advantage of OOP is better manageable code that covers following. … Continue reading OOP Interview Questions and Answers
Following is program to find minimum number from an array: <?php $numbers=array(12,23,45,20,5,6,34,17,9,56); $length=count($numbers); $min=$numbers[0]; for($i=1;$i<$length;$i++) { if($numbers[$i]<$min) { $min=$numbers[$i]; } } echo "The smallest number is ".$min; ?>