PHP - How to get between text in special string : my code is here

    $a = "@ABCD@" ;
    
    
    echo $a ;  // need print without @ @- ABCD
    
    else 
    echo "please enter your text Type in between @ @" ;

How is this done in PHP Please give example..