Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
public function goToMainMenu($text){
$explodedText = explode("*",$text);
while(array_search(Util::$GO_TO_MAIN_MENU, $explodedText) != false){
$firstIndex = array_search(Util::$GO_TO_MAIN_MENU, $explodedText);
$explodedText = array_slice($explodedText, $firstIndex + 1);
}
return join("*",$explodedText);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment