How To: Create a PHP Function and use it

Опубликовано: 10 Август 2011
на канале: debuggify
1,640
2

//how to create a function and use it with php

//first declare it.

//begin
function name_of_the_function($entering_variable){

//code
if($entering_variable == 'Something...'){
//entering variable must equal the provided text otherwise the else statment is executed.
$exit_variable = true;
}else{
//this code will execute only if the if statement is false, the variable does not equal the provided string.
$exit_variable = false;
}

//end
return $exit_variable;
}

//to use it:

//call the function
name_of_the_function('Items to pass');

//this will show: nothing.

//call the function
print name_of_the_function('Items to pass');

//this will show: nothing.


if(name_of_the_function('Items to pass')){
//if name_of_the_function('Items to pass') is true than
print 'OK Good! print this! the function returns true.';
}else{
//if name_of_the_function('Items to pass') is false than
print 'seems like the function returned false.';
}


На этой странице сайта вы можете посмотреть видео онлайн How To: Create a PHP Function and use it длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь debuggify 10 Август 2011, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,640 раз и оно понравилось 2 зрителям. Приятного просмотра!