cs1h Posted August 22, 2009 Share Posted August 22, 2009 Hi, Does anyone know how I would quickly count the number of commas in a string? (i.e. the string 1,2,3,4,5 has 4 commas) Thanks, Cs1h Link to comment https://forums.phpfreaks.com/topic/171365-counting-commas/ Share on other sites More sharing options...
Maq Posted August 22, 2009 Share Posted August 22, 2009 substr_count seems to be what you're after. Link to comment https://forums.phpfreaks.com/topic/171365-counting-commas/#findComment-903739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.