douji8549 2013-01-15 11:21
浏览 52
已采纳

在echo中插入数组[关闭]

<?php

echo '&nbsp;'.anchor('javascript:void(0);', '<img src="'.base_url().$this->config->item('FAL_assets_front').'/'.$this->config->item('FAL_images').'/pencil_min.png" alt="echo $this->lang->line(\'lbl_credits\');"  />', array('title' => '$this->lang->line(\'lbl_credits\')', 'onclick' => "CLBK_foo('".$id_encrypted."', ".($this->uri->segment(3) != '' ? $this->uri->segment(3) : 0).");return false;" ));

?>

hello, i need to write in the title value of array, but i can't find the error. maybe is also incorrect the alt?

can you help me?

  • 写回答

1条回答 默认 最新

  • dream_high1026 2013-01-15 11:40
    关注

    Looking at the title aspect of your function, it appears as though you're using single quotes around a PHP variable. Just removing them should do the trick.

    e.g. change this

    'title' => '$this->lang->line(\'lbl_credits\')'
    

    to this

    'title' => $this->lang->line('lbl_credits')
    

    I won't claim the rest of the code will work, but this will solve one problem at least!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BV260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序