I want to pass values from array as individual parameter in a query and use them as below
Array
(
[0] => some
[1] => text
)
I want this kind of function
public function getData($some,$text)
{
$sql = " select * from table where field1 = '{$some}' OR field3 = {$some} ";
$union = " UNION ";
$sql = " select * from table where field2 = '{$text}' or field4 = {$text} ";
}
Note: The array may have Nth number of index.