Tutor HuntResources PHP Resources
Two Program Listings
First a simple java example that should work without any changes. And after that a example of mixing HTML and PHP.
Date : 25/09/2016
Author Information
Uploaded by : Honey Rose
Uploaded on : 25/09/2016
Subject : PHP
Example 1. Java Examplepackage net.sf.xslthl.examplepublic final class Example {
.*
* The version of this example
.
public static final String VERSION = "1.0"
public Example() {
// nothing to do here
}
@Override
public String toString() {
return Example.class.getName()"_"+VERSION
}
}This is a Java equivalent of a constantThe default (no argument) constructor for an class. It is implied when no other constructor is defined.The following program listing makes a composition of two highlighters. This is done by using a code element within the program listing.Example 2. HTML + PHP Example
Using PHP in a HTML document
A PHP scri pt can contain normally formatted HTML, it only has to be used outside of the section. The following string is produced by PHP:
" . $msg . "lt/b>" ?>