标签: php foreach
如何在下面的代码中将$ i 添加到var $ pitch 。 结果应该是
$ pitch1,$ pitch2,$ pitch3等
$i = '1'; foreach($pitches as $pitch) { if($pitch->option_name == 'agent_pitch_'.$i) $pitch.$i = $pitch->option_value ; $i++; }