"Parse error: syntax error, unexpected T_FOREACH in"
estoy utilizando este codigo
Código PHP:
function Print_price_fileds($cnt, $p = null) {
if ($p === null){
$a = $b = $c = '';
}else{
$a = $p['n'];
$b = $p['d'];
$c = $p['p'];
}
return '
<li>
<label>Nr :</label>
<select name="price_data[$cnt][n] id="gender" >
' foreach (get_terms ( 'cat', $args ) as $tag)
{
$ciudad1 = get_option('price_data');;
if( $ciudad1 == $tag->name ) {
echo '<option value="'. $tag->name .'" selected="slelected" >'.$tag->name.'</option>';
} else {
echo '<option value="'. $tag->name .'">'.$tag->name.'</option>';
}
} '
</select>
</li>
<label>Description :</label>
<input type="text" name="price_data[$cnt][d]" size="50" value="$b"/>
<label>Price :</label>
<input type="text" name="price_data[$cnt][p]" size="20" value="$c"/>
<span class="remove">Remove</span>
</li>
'
;
}
}
gracias