I have a slight problem
I am passing a string (like this Gibraltar#Madagascar#Myanmar#Qatar) and i want to find out if the delimiter (in this case #) is in the string.
At the moment i am trying
if(preg_match("!\$this->delimiter!",$option_values))
{
$option_values=(($this->delimiter)?explode("$this->delimiter",$option_values):'');
}
but its not working - it is still returning the whole string of Gibraltar#Madagascar#Myanmar#Qatar instead of exploding it into an array. Now if i hardcode the delimiter like this
if(preg_match("!#!",$option_values))
{
$option_values=(($this->delimiter)?explode("$this->delimiter",$option_values):'');
}
its fine. However that is not flexible enough, i want to be able to use a variable name as its a lot more flexible. Anyone got any good pointers ?
thanks
GM