Good Friday evening,
I am using the following function and code as a delimiter:
<?php
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.