Home > Backend Development > PHP Tutorial > 关于PHP一段代码的问题,请高手指点

关于PHP一段代码的问题,请高手指点

WBOY
Release: 2016-06-23 13:28:18
Original
858 people have browsed it

基于thinkphp3.1开发的一套系统,采用MVC模式
有一段代码如下是在TPL中的html文件,

{"data":{"total":<?php echo $count; ?>,"page":<?php echo $pagecount; ?>,"songs":[<?php $i=1;foreach($usersongs as $val){ ?>{"id":<?php echo $val['id']; ?>,"createTime":"<?php echo date('Y/m/d',$val['createTime']); ?>","singer":"<?php echo $val['singer']; ?>","songName":"<?php echo $val['songName']; ?>"}<?php if($i!=count($usersongs)){echo ',';}$i++;} ?>],"cur":<?php echo $_GET['p']; ?>},"code":0,"info":""}
Copy after login

想请教一下,像这样的{}大括号包裹住的代码是否代表输出变量? 那么大括号中再包裹大括号又指的是什么意思?请问这属于哪方面的技术,我想搜索这方面的学习资料,谢谢!


回复讨论(解决方案)

{} 这个是json代码 不是PHP的 PHP只是输出字符串

好的,谢谢,我去找找这方面的资料

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