


PHP and Mysql web application development core technology Part 1 Php basics-1 Start to understand php_PHP tutorial
1.1 The first php
echo "Hello Everybody!";
?> ;
Additional: usage of phpinfo() function
1.2 Enter php script
1.2.1 Mark php code Paragraphs
1.2.2 Statements and comments
/* */
//
#
#
1.2.3 Mixing php and html
1.3 How to store data
1.4 Enter the basic data types of PHP
1.4.1 Numbers: (integers (int) and floating point numbers (float)) Octal represents a number that must be preceded by 0 (zero), hexadecimal represents a number that must be preceded by 0x .
Note: 1 When operating with floating point numbers, only approximate values will be taken
2 5/2=2.5 If you want to take an integer, use the round() function
1.4.2 String
Single quotes: ' ', To include a single quote in a string, just precede it with a backslash.
The simplest way to define a string is to surround it with single quotes (punctuation mark ').
To output a single quote, add a backslash () in front of it. To output a backslash before a single quote or at the end of a string, enter two (\)
Note that if a backslash is added before any other character, the backslash will be output directly. .
Double quotes " "
Escaped characters Meaning
n Line feed (LF or 0x0A (10) in ASCII)
r Carriage return (CR or 0x0D (13) in ASCII)
t Horizontal tab (HT or 0x09 (9) in ASCII)
v Vertical tab (VT or 0x0B (11) in ASCII) (since PHP 5.2.5)
f Page feed (FF or 0x0C (12) in ASCII) (since PHP 5.2.5)
\ backslash
$ dollar mark
" double quotes
[0-7]{1,3} conforms to this expression The string in the order of the expression is an octal character
x[0-9A-Fa-f]{1,2} The string in the order of the expression is a hexadecimal character
1.5 Some in Very useful function
1.5.1 nl2br: Insert html newline character after each new line (n) in the string
echo nl2br("foo isn'tn bar");
?>
1.5.2 var_dump: View Types and variable values
1.5.3 print_r: Return the result to a string instead of outputting the result to the output stream. This user-friendly output is especially useful for objects and arrays
print_r() Displays human-readable information about a variable. If given as a string, integer, or float, the variable value itself will be printed.
If given as an array, the keys and elements of the array will be displayed. Similar.
1.5.4 var_export: It is similar to var_dump, except that its output is actually a valid php code representation of the provided data value
$arr=array(1,2,3,4);
var_exprot($arr);
? >

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide
