hermetis Posted June 22, 2013 Share Posted June 22, 2013 <?php print substr_count("5485345=34534","="); ?> it prints 1 instead of 7. How can i count what is before = ? Thanks very much in advance Link to comment https://forums.phpfreaks.com/topic/279444-substr_count-question/ Share on other sites More sharing options...
kicken Posted June 22, 2013 Share Posted June 22, 2013 use strpos to find the location of the =. It's location would be equal to the count of things before it. Link to comment https://forums.phpfreaks.com/topic/279444-substr_count-question/#findComment-1437352 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.