I know this question is simple, but I have little experience with arrays and am having difficulty. Anyway I have this array:
$variables=array("$value1" => "int",$value2 => "var",$value3 => "int");
I want to cycle through it and for each $value I would like to add
$stmt->bindValue(1,$value, PDO::PARAM_INT); if $value is 'int' or
$stmt->bindValue(1,$value); if $value is 'var'
and have the '1' increase as it cycles through the variables. Does anyone know how to do this?