php 将几个变量合为数组,变量名和值对应
2023-09-11 14:22:42 时间
<?php $firstname = "Bill"; $lastname = "Gates"; $age = "60"; $result = compact("firstname", "lastname", "age"); print_r($result); ?>
==============================================
Array ( [firstname] => Bill [lastname] => Gates [age] => 60 )
相关文章
- CentOS 7系统LAMP配置PHP-FPM的示例
- Can't find PHP headers in /usr/include/php
- RPC框架Thrift例子-PHP调用C++后端程序
- php之快速入门学习-17(PHP 命名空间)
- PHP 函数判断变量空
- php Internal Server Error
- php变量和数据类型
- php变量和数据类型
- PHP post调接口代码
- Nginx + php-fpm 执行 PHP 脚本超时 报错 502 Bad Gateway + 504 Gateway Time-out 的解决办法
- 《写给PHP开发者的Node.js学习指南》一2.2 预定义的PHP变量
- php中static静态关键字的使用
- php(基本语法)--变量+常量
- PHP(基本语法)PHP中的Session-登录案例
- php 在不知道字符串有多长的情况下,如何去除前三个字符?
- PHP笔录(韩顺平)
- PHP查找与搜索数组元素
- PHP内核研究:HASH表和变量 【转】
- php面试题之三——PHP语言基础(基础部分)
- php 连接mysql 主机 localhost,显示 No such file or directory
- PHP的mod_rewrite重写模块将.php后缀换成.html
- 阐述php(五岁以下儿童) 注意事项和使用功能
- PHP PHPStorm 解决运行报错 502 Bad Gateway,配置PHP Interpreter,配置php.exe