ChenXiu Posted August 15, 2021 Share Posted August 15, 2021 When a variable hasn't happened yet, what's the best way? To use a function? To use ob_start()? Or something else? if( $condition == true ){ $instruction = ' hello do this. '; } else { $instruction = " $variable_set_later "; } //code //code //now we set that variable $variable_set_later = 'hello do something else'; // // echo $instruction; Quote Link to comment Share on other sites More sharing options...
Solution ChenXiu Posted August 15, 2021 Author Solution Share Posted August 15, 2021 Nevermind. I figured it out."sprintf()" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.