Quantcast
Channel: 9zap.com » PHP
Browsing all 15 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Using HTML inside PHP echo function

You can use HTML tags inside PHP echo function. Look below examples of echo function with html tags. Using HTML heading tag. <?php echo "<h2>Hello world!! I an learning php</h2>"; ?>...

View Article



Image may be NSFW.
Clik here to view.

Basic HTML page with PHP

Let’s see how a basic HTML page with PHP can be setup. Below is a basic HTML page: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>my first PHP...

View Article

Image may be NSFW.
Clik here to view.

Comments in PHP

PHP supports both single-line comment and multi-line comment blocks. For a single line comment use // or # and all text to the right of this symbol will be ignored by PHP interpreter. Single line...

View Article

Image may be NSFW.
Clik here to view.

PHP Variables

For any programming language variables are the bread and butter of every. PHP also have variable features. variables help you store and retrive data. PHP supports a number of different variable types...

View Article

Image may be NSFW.
Clik here to view.

PHP echo command

PHP echo command is similar to print command. Echo is a language construct that allows us to print / output some data. PHP echo commands must end with a semicolon (;) This tells PHP that the line...

View Article


Image may be NSFW.
Clik here to view.

PHP print command

PHP print command is similar to PHP echo command. Infact print command is old and traditional way to print some data in PHP. People generally think that there is some difference between echo and print...

View Article

Image may be NSFW.
Clik here to view.

Dealing with Quotation mark in PHP

You may have seen use of double quotation marks and single quotation marks in PHP. In this tutorial we will see how to deal with quotations marks in PHP. When and how to use single quotation mark and...

View Article

Image may be NSFW.
Clik here to view.

How to Join variables and strings in PHP

Sometimes we need to add “two variables” or “one variable and one string”. In this PHP tutorial we will see how to add two variables / string. Example one: Simply we can put all variables under double...

View Article


Image may be NSFW.
Clik here to view.

PHP if statement

IF statement is a conditional statement in PHP. We use IF statement to execute a set of codes when given condition is true. IF statement Syntax if (condition) { // Execute these code if condition is...

View Article


Image may be NSFW.
Clik here to view.

PHP If Else statement

IF statement is an important conditional and logical statement in PHP. If, else construct is used to add logic in php code. If else construct syntax: If (conditions) { // Execute these codes if...

View Article

Image may be NSFW.
Clik here to view.

PHP code to display Date and Time

Below is PHP code to display Date and time. <?php echo date("D M d, Y H:i:s"); ?> In above code; D -> Display day example Sunday M -> Display month example January d -> Display date,...

View Article

Image may be NSFW.
Clik here to view.

PHP code to redirect a page

You can set redirection of a page to any other url using a simple php code. In below code I will redirect to www.google.com <?PHP header("Location: http://www.google.com"); exit; ?> If you want...

View Article

Image may be NSFW.
Clik here to view.

PHP code to display visitors IP

You can show your website visitors IP using a simple PHP code. Use below code to display visitors IP. <?php echo $_SERVER['REMOTE_ADDR']; ?>

View Article


Image may be NSFW.
Clik here to view.

PHP code to display visitors browser details

You can show your website visitors browser information using a simple PHP code. Use below code to display visitors IP. <?php echo $_SERVER['HTTP_USER_AGENT']; ?> Demo Live Demo Of Browser details

View Article

Image may be NSFW.
Clik here to view.

PHP Password Generator

This is a simple PHP password generator script. It will generate 12 characters random password every time you click the generate button. The password will be combination of: 3 lower case letters 3...

View Article

Browsing all 15 articles
Browse latest View live




Latest Images