doujiao0110 2018-03-13 11:42
浏览 17

在Controller.php中更正语法

In View.php file <?php echo $ticket->player_id ?> is working. But in controller.php it is not working. What is the correct syntax for Controller.php?

I am trying to use it here

'include_player_ids' => array('<?php echo $ticket->player_id ?>'),

The following is the sample code from controller file which are working properly

// Send Email
            $email_template = $this->home_model->get_email_template_hook("ticket_reply", $lang);
            if($email_template->num_rows() == 0) {
                $this->template->error(lang("error_48"));
            }
            $email_template = $email_template->row();

            if(isset($ticket->client_username)) {
                $username = $ticket->client_username;
                $email = $ticket->client_email;
                $first_name = $ticket->first_name;
                $last_name = $ticket->last_name;
            } else {
                $username = $ticket->guest_email;
                $email = $ticket->guest_email;
                $first_name = $ticket->guest_email;
                $last_name = "";
            }
  • 写回答

3条回答 默认 最新

  • douxi3404 2018-03-13 11:44
    关注

    Its already in php tags so you do not need to place <?php ?> again just assign variable directly

    'include_player_ids' => array($ticket->player_id),
    
    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line