doujing2497 2015-02-18 12:50
浏览 21
已采纳

在数组中分配PHP变量

I'm working on integrating external code. Following is the code:

if(count($_POST))
pay_page(array('key'=>'gtKFFx','txnid'=>'shanil','amount'=>'100');

There are static values. I want to assign php variables to this array:

if(count($_POST))
pay_page(array('key'=>'gtKFFx','txnid'=><?php echo $b; ?>,'amount'=>'10');

How do I achieve that? Can somebody help?

  • 写回答

3条回答 默认 最新

  • dongniaoli1822 2015-02-18 12:52
    关注
    if(count($_POST))
        pay_page(array('key'=>'gtKFFx','txnid'=> $b,'amount'=>'10'));
    

    This should work.

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

报告相同问题?