I have a string that looks like this,
IT, MEDIA, ADVERTISING
I am then doing the following code.
$criteria = explode(",", $string)
;
This obviously creates the following when print_r is run over the $criteria.
array([0] => IT, [1] => MEDIA, [2] => 'ADVERTISING')
I using $criteria to match for keywords in a database in codeigniter application, I am wanting to using something like,
$this->db->like($criteria);
for this to work though I need the $criteria array to look like this,
array([sector] => IT, [sector] => MEDIA, [sector] => 'ADVERTISING')
How can I do this?