I've tried regular functions and call_user_function, both which do not finish executing before they get to the next line after a function call. What do people use instead? Should I just include a separate php file for every "function" I want to run?
edit:
$IDNum = 0;
$restartButtonIDName;
$playButtonIDName;
$audioPlayerIDName;
$MP3AudioSourceIDName;
$OGGAudioSourceIDName;
$resultingTextIDName;
$currentTimeIDName;
$checkOffsetIDName;
call_user_func('setIDNames');
function setIDNames() {
echo "called setIDNames <br />";
call_user_func('incIDNums');
$restartButtonIDName = "restartButton".$IDNum;
$playButtonIDName = "playButton".$IDNum;
$audioPlayerIDName = "audioPlayer".$IDNum;
$MP3AudioSourceIDName = "MP3AudioSource".$IDNum;
$OGGAudioSourceIDName = "OGGAudioSource".$IDNum;
$resultingTextIDName = "resultingText".$IDNum;
$currentTimeIDName = "currentTime".$IDNum;
$checkOffsetIDName = "checkOffset".$IDNum;
}
function incIDNums(){
echo "called setIDNums <br />";
$IDNum += 1;
}
echo $restartButtonIDName." test<br />"; // echos "test" not the resulting name
?>