doumu8217 2014-01-05 15:39
浏览 50
已采纳

too long

Basic question, I'm sure this has been answered before. But since I'm not familiar with PHP I don't know what to search for, hence the title of this question.

This code outputs 'my custom field value'

$title = stripslashes($_POST['user-submitted-customfield']);

I'd like to make it 'my custom value from @mysite', something like

$title = stripslashes($_POST['user-submitted-customfield']) + from + @mysite;

which I tried and returned an error

  • 写回答

5条回答 默认 最新

  • doulan9287 2014-01-05 15:41
    关注

    concat string in PHP

    USING .

    stripslashes($_POST['user-submitted-customfield']).' from @mysite';
    

    from php.net

    There are two string operators. The first is the concatenation operator ('.'), which returns the concatenation of its right and left arguments. The second is the concatenating assignment operator ('.='), which appends the argument on the right side to the argument on the left side. Please read Assignment Operators for more information.

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

报告相同问题?

悬赏问题

  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程