Difference between require() and require_once()?

The require() and require_once() functions perform same work. Both functions will include and evaluates the specific file while executing the code. if include() is not able to find a specified file on location at that time it will throw a warning however, it will not stop script execution. For the same scenerio require() will throw…

Read More

PHP and HTML interact?

PHP is an HTML-embedded server-side scripting language. The goal of the language is to allow web developers to write dynamically generated pages quickly. NTC Hosting offers its clients high quality PHP and HTML hosting services. Our servers are configured so as to ensure maximum performance for both your HTML and PHP-based applications and the non-interruptible…

Read More

The While Loop

A While loop is used when we have to repeat a set of statements as long as the condition is false. It could be the best where number of repetition is not known earlier or in advance. It can be explain in plain English as “Keep doing something until a condition is true”. Syntax: while…

Read More

The For Loop

PHP for loop can be used to traverse set of code for the specified number of times. For example if you want to repeat something ten or twenty times. It should be used if number of iteration is known otherwise I recommend you to use while loop. Syntax: for (Initialization; Condition; Progressive) { //set of…

Read More

PHP Superglobals

We already learned about variables, but there are some Readymade or predefined keywords in PHP that can be used without you having to create them first. Predefined or Superglobals variables are used to provide information from and about the web server, the web browser, and the user. There are several types of Super Global Variables:-…

Read More

PHP – Date / Time Functions

When working in any programming language, dealing with dates and time is a simple task. That is, until time zones have to be supported. PHP’s time () function gives you all the information that you need about the current date and time. It requires no arguments but returns an numeric value. If you will call…

Read More