-
历史上首秀的PHP程序
[PHP教程] 2021-06-01 20:29:16 87人阅读
想要在页面输出Hello World!非常简单,仅需要几行代码就可以搞定,如下所示: 纯文本 复制 ?php echo Hello World! ; ? 上面代码中 ?php 和 ? 分别表示 PHP 文...[详细]
-
PHP数组排序函数的定义
[PHP教程] 2021-06-01 20:27:53 178人阅读
1、sort() 函数 sort() 函数可以将数组进行升序排序(从小到大,由低到高),语法格式如下: sort($array [, $sort_flags = SORT_REGULAR]) 参数说明如下: $arr...[详细]
-
PHP curren里面的返回数组的当前元素
[PHP教程] 2021-06-01 20:27:16 100人阅读
通过 current() 函数,就可以获取内部指针指向元素的值,它的语法格式如下: current($array) 参数 $array 表示被操作的数组。 current() 函数可以返回当前内部...[详细]
-
一文解释PHP next和prev:向上/下移动数组指针
[PHP教程] 2021-06-01 20:24:44 57人阅读
PHP 中提供了 next() 和 prev() 两个函数,分别可以向下或向上移动数组内部的指针。 1、next() 函数 next() 函数可以返回数组内部指针指向的下一个元素的值,当...[详细]
-
PHP end:如何让数组内部指针指向最后一个元素
[PHP教程] 2021-06-01 20:23:47 86人阅读
end() 函数的语法格式如下: end($array) 参数 $array 为待操作的数组。 【示例】使用 end() 函数获取数组的组后一个元素。 纯文本 复制 ?php $array = array (...[详细]
-
分析PHP key:返回数组中当前元素的键名
[PHP教程] 2021-06-01 20:23:14 110人阅读
每个 PHP 数组内部都有一个指针,该指针指向数组的某个元素,这个被指向的元素就是当前元素。可以通过 current() 函数返回数组的当前元素。 key() 函数的语法格...[详细]
-
PHP获取当前时间的多种方法
[PHP教程] 2021-06-01 12:23:16 150人阅读
该函数的参数可以从右到左依次空着,空着的参数会被设为相应的当前 GMT 值。 使用示例如下: ?php echo gmmktime (); //没有设置参数, 则默认取得当前GMT时间 ec...[详细]
-
PHP运行情况和机制
[PHP教程] 2021-06-01 12:21:59 88人阅读
Zend 是一切的核心,所有的外围功能均围绕 Zend 实现。 2) Extensions(扩展) 围绕着 Zend 引擎,Extensions 通过组件化的方式提供各种基础服务,我们常见的各...[详细]
-
PHP局部变量与局部作用域
[PHP教程] 2021-06-01 12:21:30 116人阅读
在 PHP 中,全局变量不能直接在函数内部使用;而局部变量也不能直接在函数外部使用。当然这也不是绝对的,通过一些方法还是可以实现在函数内调用全局变量、在函...[详细]
-
PHP为什么会有定界符
[PHP教程] 2021-06-01 12:21:04 111人阅读
因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇到使用 echo 来输出大段的 HTML 代码或者 Javascript 脚本的情况。如果用传统字符串输出的话,肯定要使用大...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]