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@Array@Array.....etc 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 Quote Link to comment 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); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.