如下,我想在a href里插入函数the_permalink()if(a>b){return '<div align="center"><a href="" target="_blank"><img src="http://xxxxxxxxxxx.png"/></a></div>';}试过用echo输出,虽然能插入the_permalink(),但图片会居所有文字之上,return输出的图片则会在预设的位置,不知怎么解决

解决方案 »

  1.   


    意思是让这句话没有语法错误,让the_permalink()的值能输出return '<div align="center"><a href="'.the_permalink().'" target="_blank"><img src="http://xxxxxxxxxxx.png"/></a></div>';
      

  2.   

    你这样写不就是对的吗?
    当然 the_permalink 中也是 return 的
      

  3.   

    这样输出结果有问题,href得到的值是空的,the_permalink()的值却直接显示出来
      

  4.   

    1、the_permalink() 返回的是什么?
    2、你这样写后得到的是什么?
    3、你期望得到的是什么?
      

  5.   

    1.the_permalink()返回http://xxxx.com/123.html
    2.图片没有链接,图片上面显示http://xxxx.com/123.html
    3.给图片加链接http://xxxx.com/123.html
      

  6.   

    我猜测: 你the_permalink()最终没有 return “http://xxxx.com/123.html” 而是echo “http://xxxx.com/123.html”