techker Posted January 9, 2010 Share Posted January 9, 2010 hey guys im trying to echo a money format.. $query3 = "SELECT * FROM `tblCommande` WHERE NoCommande ='$order' " ; $result3 = mysql_query($query3) or die(mysql_error()); while ($row8 = mysql_fetch_array($result3)) { $array['assigned'] = $row8['SousTotal']); } print"$array" Link to comment https://forums.phpfreaks.com/topic/187868-how-to-make-this-work/ Share on other sites More sharing options...
iversonm Posted January 9, 2010 Share Posted January 9, 2010 well see first your replacing your data in your array for each row in your database. so the first row is $array['assigned'] and the second row replaces $array['assigned'] because its the same key in the array. you need to do something like this $array['assigned'][] so the rows stop replacing themselves in your array Link to comment https://forums.phpfreaks.com/topic/187868-how-to-make-this-work/#findComment-991894 Share on other sites More sharing options...
techker Posted January 9, 2010 Author Share Posted January 9, 2010 all im trying to do is echo money format... Link to comment https://forums.phpfreaks.com/topic/187868-how-to-make-this-work/#findComment-991909 Share on other sites More sharing options...
ignace Posted January 10, 2010 Share Posted January 10, 2010 use money_format Link to comment https://forums.phpfreaks.com/topic/187868-how-to-make-this-work/#findComment-992270 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.