tkm Posted March 3, 2008 Share Posted March 3, 2008 Hello mates, Can anyone please tell me how can I first convert two comma separated string into number and then add them in javascript? So I want to add 2 string like: 1,245+34,78,236 Any sample code would be greatly appreciated. Thank you. Link to comment https://forums.phpfreaks.com/topic/94107-adding-2-comma-separated-string/ Share on other sites More sharing options...
fenway Posted March 4, 2008 Share Posted March 4, 2008 String out the commas with a regex, then eval. Link to comment https://forums.phpfreaks.com/topic/94107-adding-2-comma-separated-string/#findComment-482836 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.