I have the following variable $areacode in it if it has 305,212
I want to use for areacode_substr=" and a.areacode like '%305%' or a.areacode like '%212%'"
Can you please tell me how to put the values into an array and then remove the commas and then use the values:
if( $areacode!=null ){
$areacode_substr = " and a.areacode like '%".$areacode."%' ";
}else{
$areacode_substr = "";
}
Thank you very much for the information.