hchsk Posted May 6, 2009 Share Posted May 6, 2009 how can i check the number of occurrences of an ampersand (&) in a string? count_chars seems to be what i'm looking for, but it returns an array that to be honest i dont entirely understand, i want an integer return perhaps somehow with regex? Link to comment https://forums.phpfreaks.com/topic/157020-solved-checking-for-ampersand/ Share on other sites More sharing options...
ohdang888 Posted May 6, 2009 Share Posted May 6, 2009 maybe substr_count()? Link to comment https://forums.phpfreaks.com/topic/157020-solved-checking-for-ampersand/#findComment-827144 Share on other sites More sharing options...
hchsk Posted May 6, 2009 Author Share Posted May 6, 2009 perfect, haha. thank you Link to comment https://forums.phpfreaks.com/topic/157020-solved-checking-for-ampersand/#findComment-827146 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.