PHP Frame Work

Frame Work is collection of software or program, that trigger off easy coding and implementing the code. It helps to programmer to achieve goals in short period of time. Some of frame works- Laravel Laravel is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following … Read more

Install PHP

To install PHP, we will suggest you to install AMP (Apache, MySQL, PHP) software stack. It is available for all operating systems. WAMP for Windows LAMP for Linux MAMP for Mac SAMP for Solaris FAMP for FreeBSD XAMPP (Cross, Apache, MySQL, PHP, Perl) for Cross Platform: It includes some other components too such as FileZilla, … Read more

Laravel “Framework” Basic Task List Tutorial

Basic Task List Introduction Installation Prepping The Database Database Migrations Eloquent Models Routing Stubbing The Routes Displaying A View Building Layouts & Views Defining The Layout Defining The Child View Adding Tasks Validation Creating The Task Displaying Existing Tasks Deleting Tasks Adding The Delete Button Deleting The Task Introduction This quickstart guide provides a basic … Read more

Laravel “Framework” Installation

Install Composer Laravel utilizes Composer to manage its dependencies. First, download a copy of the composer.phar. Once you have the PHAR archive, you can either keep it in your local project directory or move to usr/local/bin to use it globally on your system. On Windows, you can use the Composer Windows installer. Install Laravel Via … Read more

PHP mysql select average program example

php-mysql

PHP mysql select average program example PHP MySQL code to to calculate average.   <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title>Example of  avg function in php MySQL – Blog.eduguru.in</title> <meta name=”description” content=”Example of  avg function in php MySQL”> <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css”> </head> <body> <div class=”container”> <div class=”row”> <div class=”col-md-12″> <h2>Example … Read more

php include pages or files

php include page example

php include pages or files The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement. Including files is very useful when you want to include the same PHP, HTML, or text on multiple pages of a website. It is possible to insert … Read more

how to get date of yesterday using php

php how to example

how to get date of yesterday using php   <?php $test=date(‘d.m.Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘d-m-Y’,strtotime(“-1 days”)); echo $test; ?> or <?php $test=date(‘y-m-d’,strtotime(“-1 days”)); echo $test; ?>

PHP print Statement

php_print_statement

PHP print Statement The print statement can be used with or without parentheses: print or print(). Display Text The following example shows how to output text with the print command (notice that the text can contain HTML markup): Example <?php print “<h2>PHP is Fun!</h2>”; print “Hello world!<br>”; print “I’m about to learn PHP!”; ?> Output: PHP is Fun! Hello world! I’m about to learn PHP! … Read more

PHP substr() function

php substr function

<?php   // PHP program to illustrate substr() function Substring($str){     $len = strlen($str);     echo substr($str, 8), “\n”;     echo substr($str, 5, $len), “\n”;     echo substr($str, -5, 10), “\n”;     echo substr($str,-8, -5), “\n”; }   // Driver Code $str=”blogsforblogs”; Substring($str);   ?> Output: blogs forblogs blogs for The substr() is a built-in function in PHP that is … Read more

How to identify server IP address in PHP

php how to example

How to identify server IP address in PHP   or the server ip: $_SERVER[‘SERVER_ADDR’]; and this for the port $_SERVER[‘SERVER_PORT’]; You can use this in CRUL as below: <?php // create a new cURL resource $ch = curl_init (); // set URL and other appropriate options curl_setopt ($ch, CURLOPT_URL, “http://blog.eduguru.in/test”); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt … Read more