Does anyone know if it is possible in a snippet to process each line of a selection in a loop?
I’d like to do something like
var1
var2
var3
and if I select those lines and run my snippet I want to produce:
$var1 = mysql_real_escape_string($record->{‘var1’});
$var2 = mysql_real_escape_string($record->{‘var2’});
$var3 = mysql_real_escape_string($record->{‘var3’});
of course the number of variables would be unknown though.
And then if thats possible I’d like to be able to create a snippet that could produce insert statements the same way:
mysql_query(“INSERT INTO myTable ( var1, var2, var3 )
VALUES ( ‘{$var1}’, ‘{$var2}’, ‘{$var3}’)”);
anyways for now I was just wondering if I could grab multiple lines like that and manipulate each of them