PHP vs JavaScript

OVERVIEW

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

 

 

JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. 

Comment

PHP supports several ways of commenting:

Example

// This is a single-line comment
# This is also a single-line comment

/*
This is a multiple-lines comment block
that spans over multiple
lines
*/

 

4 Ways to Declare a Single line comments start with //

Example

// Change heading:

/*
This is a multiple-lines comment block
that spans over multiple
lines
*/

VARIABLES

In PHP, a variable starts with the $ sign, followed by the name of the variable:

Example

$txt = “Hello world!”;
$x = 5;
$y = 10.5;
?>

 

4 Ways to Declare a JavaScript Variable:

Using var
Using let
Using const
Using nothing

Example

var x=5;
let y=2;
const price  =4;

Web Hosting

1. PRIMARY Domain

Primary Domain is the domain you primarily use . Example: MyMainDomain.COM. This is the domain name assigned as your account’s “main” domain. It’s the domain you use to log into your account, as well as to identify your account to Bluehost representatives. There can only be one Primary domain name at a time on a given hosting account.

2. ADD-ON Domain

Completely separate Domains and managed by the same Hosting account. This is any domain hosted and managed from your main hosting account, but that is linked to a separate website than your primary domain. Content and files for a separate website are stored in a unique folder within your public_html folder. Use domains as “add-ons” when you wish to create a completely separate website on your account with its own domain name, apart from the primary domain name.

Example:  Mystore1.com, MyStore2.com and MyMainDomain.com. These domains have their own separate website URL, such as www. Mystore1.com, www. Mystore2.com and www. MyMainDomain.com

3. PARKED Domain

Most Hosting allow multiple domains on one account. Several Domains and point to your primary Domain. Any domain set as a “parked” domain serves to point to the same content and website as your primary domain. This is helpful if you have one website but wish to have multiple domains point to it.

For example, MyMainDomain.com might be your primary domain, but you might also wish to register MyParkedDOmain.com and point them all to the same website to MyMainDomain.com

4. SUB-DOMAINS Domain

Subdomains are based on prefixes added before a given domain name. Prefix is added to primary Domain. Unlike other Domains type, you need to register and pay for the domain name, this type of domain can be created free of charge within your hosting account. They are a great way to organize your site or create sub-websites that while different, still make sense to include under the same domain. You can create as many sub-domains as you wish for any of your domain names.

All of your domains on your account can always be managed from your domain manager. We work hard to make our domain manager super simple to use and completely full-featured. From there you can not only purchase or renew domains, but you can change how they are assigned to your account.

Example: abc.MyDomain.com.

×

Web Hosting​