我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

为什么<? 用于和<?php [复制]的区别

This question already has an answer here:

  • Reference — What does this symbol mean in PHP? 18 answers

I am learning php and Ajax, but I see a code where <? is used.

<?php while($row=mysql_fetch_array($result)) { ?>
<option value=<?=$row['id']?>><?=$row['statename']?></option>

Please could you help me to understand why is

You can use

<?=$row['statement'] ?>

as a convenient shorthand to

<?php echo $row['statement'] ?>

this can improve readability.

Read the manual.

It will explain everything about tags.

http://www.php.net/manual/en/language.basic-syntax.phpmode.php

近期文章

  • 为什么window.location.href没有完成$ .post ...?
  • 从mysql表中提取id
  • 使用表单的PHP Mysql更新表不会更新
  • 如何将特定类应用于页面上的导航链接?
  • PHP Sessions购物车:如果产品已经是会话,则更新产品
  • getList的响应应该是一个数组,而不是一个对象或restangular中的其他东西
  • 与php整数相反
  • 如果家庭css为wordpress
  • PHP BETWEEN子句用法
  • Wordpress - 如何删除标题[关闭]
  • PHP MySQL命令语法错误
  • 无法将MySQL表连接到我的PHP文件
  • Mysql PHP错误 - 登录验证
  • 我的PHP会话登录世界
  • 将php数组转换为unicode json
  • 获取正则表达式中所有可能的匹配项
  • 选择MySQL中范围之间的所有时间戳
  • bootstrap处理ajax表单提交
  • Html Dom解析器得到第一个元素
  • 在PHP和mysql中将DATETIME与time()进行比较

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华