forumnz Posted December 22, 2007 Share Posted December 22, 2007 I have a variable: $var which is a list of email addresses separated by a comma. I have a script that successfully sends an email to all those addresses. I want the script to count the number of emails there. I believe I should use the explode function, but don't know how. I looked online to no avail. Please help this is urgent. Sam. Link to comment https://forums.phpfreaks.com/topic/82765-solved-php-explode-function/ Share on other sites More sharing options...
papaface Posted December 22, 2007 Share Posted December 22, 2007 $split = explode(",",$var); $count = count($split); echo $count; //thats how many emails there are Disclaimer, this code has not been tested but should work Link to comment https://forums.phpfreaks.com/topic/82765-solved-php-explode-function/#findComment-420943 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.