Overview
can be used :-
- PHP based web page
- To preform dynamic action ie email or updata data sources
- As a endpoint returning JSON or xml
- As a endpoint returning HTML
When embedded in Html pages
- Php can be call dynamicly from buttons on forms
- Directly embeded in html source for function calls small dynamic generate html units
- called via AXAJ (normally jquery)
Code Examples
using php functions with html (use .php extension) with html tag at start | Today is Monday 12/04 time is 04:37:15am |
Using a button to call php | |
Using a button to call php (getjson) |
|
via a script using ajax,calls an external php file ( which echos html code) and then uses .replacewith |
|
json endpoint using ajax, calls an external php file (encode mysql to json) jquery build table |
|
Comments | // single line , /* multi line*/ |
Overview
Variables |
Keywords echo are case-insensitive, variables are case-sensitive.
PHP is a Loosely Typed Language Globals ans static variables can be used full range of strings, interge etc Names rules
|
Operators |
Full list |
statements | ## |
Arrays |
|
Objects | PHP 5 is 'object-capable language'. with ability to build use classes tutorials :- w3 objects w3resource |
Built in Functions | PHP has more than 1000 built-in functions Including:- |