chordsoflife Posted April 17, 2008 Share Posted April 17, 2008 I have a rating bar script set up. Where I want it, I just throw in: <?php echo rating_bar('id','10'); ?> I want to include this whole page and have a variable name at the top of each page so it can change accordingly. IE: define('RATING_ID','thisID') How do I get a variable between the ' and the ' without it just assuming that's what the ID is? Quote Link to comment https://forums.phpfreaks.com/topic/101598-solved-easiest-question-evar/ Share on other sites More sharing options...
craygo Posted April 17, 2008 Share Posted April 17, 2008 if you want a variable you don't need any quotes. The single quotes will take what's inside exactly how it is. define('RATING_ID',$thisID) Unless I am misunderstanding you. Ray Quote Link to comment https://forums.phpfreaks.com/topic/101598-solved-easiest-question-evar/#findComment-519785 Share on other sites More sharing options...
chordsoflife Posted April 17, 2008 Author Share Posted April 17, 2008 Oh, no, yea, I'm just an idiot. Turns out I was just looking at the wrong thing. I forgot a semicolon. All part of the learning process I guess. Sorry for cluttering your forum with nonsense. Quote Link to comment https://forums.phpfreaks.com/topic/101598-solved-easiest-question-evar/#findComment-519787 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.