PHP 学习笔记 2011-06-29

WBOY
Release: 2016-06-23 14:28:49
Original
827 people have browsed it

php常见的区别

1. 单引号和双引号

$abc=”world”;

echo “ni hao $abc”; ---->输出的是:  ni hao world

echo ‘ni hao $abc’;  ----->输出的是: ni  hao $abc

?> 

再如:

echo “ni hao php”; ---->输出的是:  ni hao php

echo ‘ni hao php’;  ---->输出的是: ni  hao php

?> 

2.输出方式: 一共四种方式

print_r($_SERVER['REMOTE_ADDR']."
");
print($_SERVER['REMOTE_ADDR']."
");
echo $_SERVER['REMOTE_ADDR']."
";
printf ($_SERVER['REMOTE_ADDR']."
");

3.声明方式( 四种方式,定义是php代码)

?>

-------------------------

…?>

------------------

----------------

%>

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