This method can also be used to determine whether the delimiter exists. For example:
Copy code The code is as follows:
if($_MODULE[tg1_tjly]){
$tg1_tjly = explode("|",$_MODULE[tg1_tjly]);
if( count($tg1_tjly)>1){ //The key point here is that when the statistics array is greater than 1, it means that it contains one or more interval symbols "|".
$tg1_tjly_tit = $tg1_tjly[0];
$tg1_tjly_con = $tg1_tjly[1];
}else{
$tg1_tjly_tit = 'Recommendation reason';
$tg1_tjly_con = $_MODULE[tg1_tjly];
}
}else{
$tg1_tjly_tit = 'Enter the recommendation reason title';
$tg1_tjly_con = 'Enter the recommendation reason content, please enter the recommendation reason content, please enter the recommendation reason content. ';
}
?>
The above introduces the method of using explode to find whether a certain character exists in exploded php, including the content of exploded. I hope it will be helpful to friends who are interested in PHP tutorials.