Browsing:

Category: Php Knowledge

Post Json Data With Php curl

How to POST JSON Data With PHP cURL? The PHP cURL is a library used for making HTTP requests. use PHP cURL, we need to enabled libcurl module for PHP on your system. When we working with web services and APIs, sending JSON data via POST request is the most required functionality. PHP cURL makes it easy to POST JSON data to URL. I will show you how to POST Read more…


Random/Shuffle Images in PHP

shuffle function in php Hello friends, Sometimes we need to show random images on your page on every refresh. user will see random images. suppose if we have blog that have 50 images using php shuffle function we will show random images on our home page. shuffle() function randomizes the order of the elements in the array.shuffle function assigns new keys for the elements in the array. Existing keys will Read more…


HTTP GET and POST Method in PHP

What is HTTP? HTTP Stands for Hypertext Transfer Protocol (HTTP). That is Manipulate to enable communications between clients and servers. HTTP works as a request and response protocol between a client and server. What is client and Server There are two ways the browser client can send information to the web server. A web browser may be the client, and application on a computer that hosts a web site may be Read more…


How To Check Number Is Odd Or Even

How To Check Number Is Odd Or Even in php. first we understand what is even and odd. Even Number : A number is called even if the number is divisible by 2 Odd Number : A number is called odd if it is not divisible by 2. Below are simple Examples for understand : Input : 90 Output : Even Explanation: The number 90 is divisible by 2 Input Read more…


Building a Bootstrap Contact Form Using PHP and AJAX

Hello friends, In this tutorial I’ll go over the steps to create a working contact form using Bootstrap, in combination with AJAX and PHP. From there we can explore some additional features such as some fancy CSS animation with animate.css, further validation in jquery. you need to add some css and js files in your folder.   Html Form Start Here : <!DOCTYPE html> <html> <head> <title>Contact form </title> <meta Read more…


How do I Convert Date Format in PHP

Hello friends, We uses PHP strtotime() and date() functions to convert date format in php. For example we have stored a date YYYY-MM-DD format in a variable and need to change this to MM-DD-YYYY format. We can achieve this by converting date first to seconds using strtotime() function. After that reconstruct date to any format using date() function. Examples are below 1. Change YYYY-MM-DD => MM-DD-YYYY Here we have date Read more…