suttercain Posted April 21, 2007 Share Posted April 21, 2007 Good Friday evening, I am using the following function and code as a delimiter: function between($beg, $end, $str) { $a = explode($beg, $str, 2); $b = explode($end, $a[1]); return $beg . $b[0] . $end; } $string = www.domain.com; $between = between('.', '.', $string); echo $between // .domain.com I am trying to get it to echo out only the domain not including the . . Does anyone know how I would get it to only echo domain instead of .domain. Thanks for the help and advice. Link to comment https://forums.phpfreaks.com/topic/47987-solved-my-delimiter-my-delimiter-my-lovely-lady-delimiter-help/ Share on other sites More sharing options...
kenrbnsn Posted April 21, 2007 Share Posted April 21, 2007 You're return the string you found with delimiters in this statemen: <?php return $beg . $b[0] . $end; ?> Just return the string found: <?php return $b[0]; ?> Ken Link to comment https://forums.phpfreaks.com/topic/47987-solved-my-delimiter-my-delimiter-my-lovely-lady-delimiter-help/#findComment-234504 Share on other sites More sharing options...
suttercain Posted April 21, 2007 Author Share Posted April 21, 2007 Awesome, Thank you Ken. Link to comment https://forums.phpfreaks.com/topic/47987-solved-my-delimiter-my-delimiter-my-lovely-lady-delimiter-help/#findComment-234505 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.