dqg2269 2014-10-03 11:59
浏览 10
已采纳

这在PHP中用于OpenCart的含义是什么:$ _ ['SomeName'] ='SomeValue';

What kind of variable is this in PHP $_['entry_store'] = 'Stores:'; used in OpenCart

Is used for saving string of text.

For example like this... Is it a global variable, or what is it ? it begins with $_['SomeName];

<?php
$_['heading_feedback']= 'Feedback';
$_['heading_feedback_author']= 'Feedback';
$_['text_success'] = 'Success: You have modified feedback!';
$_['text_default'] = 'Default';
  • 写回答

3条回答 默认 最新

  • dongshan2680 2014-10-03 12:01
    关注

    No, it's not a global variable. It's a regular variable with the name _, and it's an array.

    $_ = array();
    $_['array_key'] = 'value';
    

    Variables can be named in almost any way, the only limitation is the parser, and _ is not a character that blocks that (for example ${0} is a valid variable declaration)

    Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失