I am very new to php programming. So my questions will come across as being very amateurish.
First, how do I get the system date and time through php?
Second, what is the escape sequences like in php? Is it, for instance, \" for " like Java?
Thirdly, what are boolean AND and OR in php? Are they &&, || and &, | like in Java?
Thanks in advance!
newbie questions
Moderator: General Moderators
Re: newbie questions
If you mean system = the server on which php is running on, then see the date() function. If you mean the date and time on the user end, you can't do that with php - use Javascript instead.verymeanguy wrote:First, how do I get the system date and time through php?
Yes, that's rightverymeanguy wrote:Second, what is the escape sequences like in php? Is it, for instance, \" for " like Java?
What do you mean by boolean? do you mean logical or bitwise?verymeanguy wrote:Thirdly, what are boolean AND and OR in php? Are they &&, || and &, | like in Java?
Logical AND: "&&" and "and" - where "&&" has higher precedence.
Logical OR: "||" and "or" - where "||" has higher precedence.
Bitwise AND: "&"
Bitwise OR: "|"
Note: the bitwise operators has higher precedence over the logical operators. For instance: "&" has higher precedence over "&&", "and", "||" and "or".
See: http://us2.php.net/manual/en/language.o ... precedence