I use the following comman:
$db = &JFactory::getDBO() ;
$query = "SELECT value FROM #__k2_extra_fields ";
$query.= "WHERE name = 'City'";
$db->setQuery($query);
$rows2=$db->loadResult();
and i get this:
name":"Nicosia","value":1,"target":null},{"name":"Larnaka","value":2,"target":null},{"name":"Limassol","value":3,"target":null},{"name":"Ammochostos","value":4,"target":null},{"name":"Pafos","value":5,"target":null}]name":"Nicosia","value":1,"target":null},{"name":"Larnaka","value":2,"target":null},{"name":"Limassol","value":3,"target":null},{"name":"Ammochostos","value":4,"target":null},{"name":"Pafos","value":5,"target":null}]
i want to extract these data to these form:
Nicosia, Larnaka, Limassol, Ammochostos, Pafos
basically is there any loop to take them sequentially (for each loop) how i extract them correctly?