Hi,
So a I am beggining w/ php as of a few months ago and I am just trying to find some symbol definitions. If someone could explain to the best degree it would be greatly appreciated.
Here is the 1st: "!" as in (!feonf($fp))
2nd I'm reading a PHP book and there are examples in this format:
"string fread(int fp, int length);" I'm trying to fill the blanks, but am unsure of the meaning of the term "int", maybe I am just totally missing something here!
And 3rd: if anybody has any info of the switch statement in relation to else and else if, I'm still trying to work it out.
Thanks for any help! [php_man][/php_man]
Hi, I have a few PHP questions I'm sure some buffs will know
Moderator: General Moderators
-
southeastweb
- Forum Newbie
- Posts: 14
- Joined: Sun Mar 21, 2004 3:28 am
- Location: Florida
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Can't really help with the first question.
In reply to the second I recommend http://www.php.net/switch
Basically switch is used to replace IF THEN, ELSEIF, ELSEIF statements.
If you do not understand the instructions on the link ask again and I will try to give you more information.
In reply to the second I recommend http://www.php.net/switch
Basically switch is used to replace IF THEN, ELSEIF, ELSEIF statements.
If you do not understand the instructions on the link ask again and I will try to give you more information.
Re: Hi, I have a few PHP questions I'm sure some buffs will
"!" stands for "is not". In this case it means "if is not end of file(filehandler)"southeastweb wrote:Hi,
Here is the 1st: "!" as in (!feonf($fp))
That describes a function. The format of function descriptions in the PHP manual (as in any good manual) includes the variable type that is passed to and returned by the respective function.southeastweb wrote: 2nd I'm reading a PHP book and there are examples in this format:
"string fread(int fp, int length);" I'm trying to fill the blanks, but am unsure of the meaning of the term "int", maybe I am just totally missing something here!
"string fread(int fp, int length)" means: function fread returns a string and needs two variables of type integer as arguments (or parameters). If it would read:
"string fread(int fp, [int length])" it would mean that the last argument is optional.
Do spend some time reading the manual, it's a fantastic ressource. I'd especially recommend reading the chapter "Language Reference" which delves into much greater detail than I ever could.
Whatever your question regarding PHP, the manual should always be your first port of call. Even the most seasoned PHP developers have a copy handy.