English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1- How to write user defined function in PHP
2- how calling that function in PHP
3- return value in PHP
4- How end function? in PHP
5- Arrays start with 0 or 1? in PHP
6- is thererequire ; at line end ? in PHP
7- is there string concatenation in PHP
8- Is there require {} after if statements? in PHP
9- if syntax? in PHP
10- else if syntax? in PHP
11- how reference variables? in PHP
12- equality test? in PHP
13- comments? in PHP
14- additional notes? about PHP

2006-07-27 06:07:18 · 3 answers · asked by guess m 1 in Computers & Internet Software

3 answers

How about you read the documentation first?

1- How to write user defined function in PHP
2- how calling that function in PHP
3- return value in PHP
4- How end function? in PHP

http://www.php.net/functions

5- Arrays start with 0 or 1? in PHP

http://us2.php.net/types_array

6- is thererequire ; at line end ? in PHP

http://www.php.net/basic-syntax.instruction-separation

7- is there string concatenation in PHP

http://www.php.net/operators_string

8- Is there require {} after if statements? in PHP
9- if syntax? in PHP
10- else if syntax? in PHP

http://www.php.net/if

11- how reference variables? in PHP

http://us2.php.net/variables

12- equality test? in PHP

http://www.php.net/operators

13- comments? in PHP

http://www.php.net/basic-syntax.comments

2006-07-27 07:45:03 · answer #1 · answered by NC 7 · 0 0

1-function NAME($variables, $ofthings, $being, $passed)
{

stuff to do
return($if anything);
}


2- NAME($variables, $ofthings, $tobe, $passed);

3- return($value);

4- return($anything); or return();
}

5- 0

6- statements require ; at the end... php starts with

7- yes... $num = 123; $num .= 456;

8- no, if it is true it will execute either from { to } or only the next line. It is not REQUIRED but good practice to use it regardless

9- if ($a == $b)
{
do stuff
}

10- if($a == $b)
{do stuff}
else if ($a == $c)
{do stuff}
else
{do stuff}

11- $variable

12- if ($a == $b) or ($a != $b) does not equal

13- /* comments */ for multi line or # for single line

14- I've done enough of your homework.

2006-07-27 13:19:34 · answer #2 · answered by Duds331 5 · 0 0

10 if($a == $b)
{do something}
else if ($a == $c)
{do something}
else
{do something}

2014-05-17 07:26:24 · answer #3 · answered by ? 2 · 0 0

fedest.com, questions and answers