i have an array and i want to convert this array in comma seprated string by implode function but this is not working. my code is below.
<?php
$relatedSlides = $result['RelatedSlideshows'];
$relatedSlides = implode(",",$relatedSlides);
echo $relatedSlides;
?>
$result[‘RelatedSlideshows’]; is an array and it is printing perfectly. this is not an multidimensional array. this is simple array. how i do this???
A simpleXML object is not an Array. It is an object that under some circumstances can be treated like an array. Manual Reference
The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object that can be processed with normal property selectors and array iterators.Try: