- array_map: documentation ( source)
- var_export: documentation ( source)
- implode: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
<?php
$var = "one, two, three";
$testArray = explode(",",$var); // comma separator. $var is used WHERE field in ($var)
$bindings = implode(",", array_map(function($key) {return ':'.trim($key);}, $testArray));
var_export($bindings);