[Resolved] get_the_title and explode
For some reason, explode is not working and just returns input string.
$str = get_the_title(); $arr = explode("- Episode",$str); $res = $arr; echo $res;
For example title was “Steins;Gate – Episode 15”, it returns whole title, instead of just “Steins;Gate”. If I supply string directly ->
$str='Steins;Gate - Episode 15'instead of get_the_title it works as it is supposed to. Why I’m getting this problem?
- The topic ‘[Resolved] get_the_title and explode’ is closed to new replies.