In developing any application using functions is something primal, through them you can run code blocks apart and use them in various parts of the system. The main functions of the role is to ensure that there is a greater reuse of code, without its use would be necessary to implement the same code block every time it was needed. It is common to find validation functions, for example, to illustrate this scenario.

In PHP a function is declared from the syntax and function is written as follows:

<?php

function info(){

echo (“This is a PHP Function.”);

}

?>

The functions can also return certain information and still receive parameters for the actual processing of the data, as shown below:

<?php

function info($var1, $var2){

return $var1 + $var2;

}

?>

To call certain function in PHP, just write your name and send the parameters when necessary. Who is starting in the programming world need to understand well the operation of more that item as well as several others he is also part of the daily life of a programmer.

php

Learn PHP one of the most powerful tools in the market. Scriptcase has a section on the site dedicated just for those who want to learn, moreover, offers a free version of its tool for those who do not want to waste time. Download now Scriptcase and discover a world of advantages primarily focused on results.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.