Home  >  Article  >  php教程  >  php echo字符串的连接格式,phpecho字符串格式

php echo字符串的连接格式,phpecho字符串格式

WBOY
WBOYOriginal
2016-06-13 08:45:041652browse

php echo字符串的连接格式,phpecho字符串格式

echo "\"center\">php echo字符串的连接格式,phpecho字符串格式

1.  \"    \"

2.  

echo <<<theEnd
        line 1
        line 2
        line e
    theEnd

 

实例

随机三张图片(banner)

 

 1 php
 2   $pictures = array('tire.jpg', 'oil.jpg', 'spark_plug.jpg',
 3                     'door.jpg', 'steering_wheel.jpg',
 4                     'thermostat.jpg', 'wiper_blade.jpg',
 5                     'gasket.jpg', 'brake_pad.jpg');
 6 
 7   shuffle($pictures);
 8 ?>
 9 
10 
11   Bob'<span>s Auto Parts
12 
13 14 15

Bob's Auto Parts

16
17 181920php 21for ($i = 0; $i < 3; $i++) { 22echo ""; 25 } 26 ?> 2728
php echo字符串的连接格式,phpecho字符串格式; 23 echo $pictures[$i]; 24 echo "\"/>
29
30 31

 

 

 

Statement:
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