, =>, }, ',', OR, XOR, AND, =, "/> , =>, }, ',', OR, XOR, AND, =, ">
Home > Backend Development > PHP Tutorial > 基础有关问题,初学者,非常感谢

基础有关问题,初学者,非常感谢

WBOY
Release: 2016-06-13 13:22:16
Original
787 people have browsed it

基础问题,菜鸟求救,非常感谢.
$u1_nick = $this->session->userdata('userinfo')['screen_name'];

如上的代码,在NetBeans里面报错,报错是:
"语法错误:
预期: instanceof, as, ->, =>, }, ',', OR, XOR, AND, =, +=, -=, *=, /=, .=, %=, &=, |+, ^=, >=, ?, ';', ||, &&, |, ^, &, ==, !=, ===, !==, =+, , >, +, -, *, /, %, '.', ++, --, ], ), ':'
"
本人纯粹PHP新手,请大家指导一下,为什么在别人那儿是没问题的,是不是我有些PHP的特性没打开?非常感谢.

------解决方案--------------------
完整的错误信息是什么? var_dump($this->session->userdata('userinfo')); //贴出结果
------解决方案--------------------
$u1_nick = $this->session->userdata('userinfo')['screen_name'];
这种用法只在 php5.4 中是合法的

Related labels:
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