So let’s say I have variable like this one:
$q = "DB::select('id')->from('reports')->where('field', '=', 'value');";
Now how can I remove " " or do something that would make it executable query?
$q = DB::select('id')->from('reports')->where('field', '=', 'value');
Btw I’m using the kohana framework, but I don’t think that it matters since it’s a simple php code.
You can do it by using
eval. Eval is considered very harmful, so make sure you sanitize everything before even considering to useeval.