<?php
$parent_cat = 57;
$child_cats = get_categories('child_of='.$parent_cat);
if($child_cats) :
echo '{ ';
foreach($child_cats as $cat) {
echo $sep . $cat->cat_name;
$sep = ', ';
}
echo ' }';
endif;
?>
The above code outputs a number of categorys in this format:
A Cut Above,A20Labs,AMCH,
how would I add ' ' around each of the elements for output like this?
'A Cut Above','A20Labs','AMCH',
2nd question, how would I code it so that that the output goes into this array code like this?
<?php $type_array = array('A Cut Above','A20Labs','AMCH',)?>
Thanks so much! Azeem