私は以下のコードを持っています。このStrPosはどのようにPHPで動作しますか?
//Gift Card Redemption
if(strpos($_order->getDiscountDescription(), 'Gift Card') !== false){
$order .= 'RGC1*1*'.$_order->getDiscountDescription().'*****';
$order .= "\r\n";
}
私はそれがうまくいくと思う方法::$_order->getDiscountDescription()
に「ギフトカード」を探し、それが偽でなければ、何かをする、それが働いている場合、私はそれだと思うように私は思ったんだけど。私は何かが何であるかに従わない。その上の任意のアイデア?
質問する適切なプラットフォームは: - https://codereview.stackexchange.com/です。ちょうどそれが起こっている正確に何を考えているか。読む: - [strpos() - 手動](http://php.net/manual/en/function.strpos.php) –
あなたは正しいです。 '$ order'変数にデータを追加します。 – chris85