numan82 Posted February 17, 2008 Share Posted February 17, 2008 Hi There, I've a little problem, I am converting the mulitdiementional array into string but facing problem code as follow ----- function GettingValue(){ while($row=mysql_fetch_array(result,MYSQL_BOTH)) { $Data[$i]['UserID']=$row['UserID']; $Data[$i]['UserName']=$row['UserName']; $i++ } return $Data; } Now Want to convert this multidiemsional array into the string, I know the implode function but it is not working in my case for example $result=implode("@",$Data); echo $result; it shows only Array@[email protected] it is clear that it is nested array but I don't know the way to come out of this little confusion any help in this regard is highly appreciated. Thanks! Numan Link to comment https://forums.phpfreaks.com/topic/91522-converting-multidiementional-array-into-string/ Share on other sites More sharing options...
Barand Posted February 17, 2008 Share Posted February 17, 2008 try <?php $newdata = array(); foreach ($data as $array) { $newdata[] = implode('@', $array); } echo implode ('|', $newdata); ?> Link to comment https://forums.phpfreaks.com/topic/91522-converting-multidiementional-array-into-string/#findComment-468815 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.