Blogs On php

About php

PHP is one of the most popular server-side scripting and HTML embedded languages which is designed primarily for web development but also used as a general-purpose programming language. HTML embedded means that you can use PHP statements within an HTML code. The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. PHP scripts can only be interpreted on a server that has PHP installed. PHP code may be embedded into HTML code.

Login with Facebook using PHP

Login or Resister user using Facebook

Hmm, If your website has a customer base section or any kind of customer interaction activity, then you must need to add a login with Facebook. In this tutorial, I'll show you a complete step by ste...

Remove a specific item from an array in PHP

Remove any word from your array

Some ask for a more-specific post about removing items from your code, here’s an easy way to remove a specific element from a PHP array by key instead of index. function my_remove_array_item( $...

Explode string by last occurrence and get first part

Explode and Implode string in php

Some of the cases we need to split any string or it may be my URL to split. Now I am explaining to you, how to explode the string by the last occurrence at getting the first part of the string in a si...

How do you Encrypt and Decrypt a PHP String

MCrypt encription in php

What is Mcrypt in PHP? Mcrypt is a replacement for the popular Unix crypt command. the crypt was a file encryption tool that used an algorithm very close to the World War II Enigma cipher. Mcrypt pro...

How to find prefix and suffix of the word in javascript

Find start and end position of selected text

First of all, you have to know that how to get the currently selected text on the page by using the JavaScript. So, Javascript provided a method for retrieving the current selection of the page by usi...

How to find minimum value of an array

Minimum value of an array using foreach loop

It's very simple to find the minimum value of an array using foreach loop. Create an array with some numeric value. Now create a temporary variable $temp in which stored array’s first index&rsqu...

Find the Largest Number in an Array using php

Example  for getting largest number in an array

Example  for getting largest number in an array: $array = array(20,18,95,45,48); $max1 = 0; $max2 = 0; for($i=0; $i<count($array); $i++) { if($array[$i] > $max1) { ...

Call by reference in php with example

Reference variable in php with example

Let's understand the concept of call by reference by the help of examples. Variable $str is passed to the adder function where it is concatenated with 'Call By Reference' string. Here, printing $str v...