PHP_Complete_Notes_with_Projects
PHP_Complete_Notes_with_Projects
PHP stands for Hypertext Preprocessor. It is a server-side scripting language embedded in HTML.
Syntax:
<?php
?>
PHP variables are declared using the $ sign. E.g., $name = 'John';
Operators: Arithmetic (+ - * / %), Assignment (= +=), Comparison (== != ===), Logical (&& || !)
PHP Complete Notes (Beginner to Advanced)
Example:
echo 'Adult';
} else {
echo 'Minor';
}
PHP Complete Notes (Beginner to Advanced)
Syntax:
function greet() {
echo 'Hello!';
return $a + $b;
}
PHP Complete Notes (Beginner to Advanced)
echo $fruit;
}
PHP Complete Notes (Beginner to Advanced)
<form method='post'>
<input name='name'>
</form>
Open, Read, Write files using functions: fopen(), fread(), fwrite(), fclose().
fclose($file);
PHP Complete Notes (Beginner to Advanced)
Cookies are stored in the browser. Set with setcookie() and read with $_COOKIE.
PHP Complete Notes (Beginner to Advanced)