4 tips for getting started with PHP

PHP中文网
Release: 2023-03-16 20:26:01
Original
917 people have browsed it

1. Download an integrated environment software, that is, others put all the mess together and make it into software. This is SG style, and I think it is suitable for beginners. This is a good point;
2. Download and install .php.zend.apache separately; This method is the most confusing and I haven’t figured it out yet.
I installed php because IIS is installed on the machine. Just like zend. Now you can run php and asp at the same time on the server.
php is embedded and run in html. As follows:

<?php 
     $a="你好"; 
     $b=" php"; 
     echo $a.$b; 
?>
Copy after login

Instructions:
Define a variable with $ Variable name, as shown above $a $b, when referencing this variable, also use $ variable name to quote;
After each statement is completed, add a ';' sign to indicate the end;
Use echo to output the content Come;
$a.$b;The '.' sign in this is used to connect two strings.
The running result of the above program is:
Hello, PHP!
Output php information:

<?php 
   phpinfo(); 
?>
Copy after login

if statement in php:

<?php 
    $a=10; 
    $b=1; 
    if($a==$b){ 
        echo "a=b"; 
    } 
?>
Copy after login

The output result is:
a=b
MD5 encryption function, do Everyone who has been through the web knows md5. This is just a function in php. Just call it:

<?php 
    $a="php"; 
    $b=md5($a); 
    echo $b; 
?>
Copy after login

The output result is:
e1bfd762321e409cee4ac0b6e841963c

The above is the detailed content of 4 tips for getting started with PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!