How can I add $i to var $pitch in below code. Result should be
$pitch1, $pitch2, $pitch3, etc.
$i = '1';
foreach($pitches as $pitch) {
if($pitch->option_name == 'agent_pitch_'.$i) $pitch.$i = $pitch->option_value ;
$i++;
}
How can I add $i to var $pitch in below code. Result should be
$pitch1, $pitch2, $pitch3, etc.
$i = '1';
foreach($pitches as $pitch) {
if($pitch->option_name == 'agent_pitch_'.$i) $pitch.$i = $pitch->option_value ;
$i++;
}