I have an array $a that consists of two values pulled from a SQL database that are then put into an array, those values are SKU and Image. At the end of the value for Image alot of the items have commas at the end. What I am trying to do is trim the value for Image to remove the commas from the end. The code I have is:
$trimmed = rtrim($a['Image'], ",");
When it does that and I try to display what $trimmed contains, it displays nothing. I believe it is an error in the way I have the rtrim function setup. Could anyone help me on this?