eleven0 Posted November 27, 2008 Share Posted November 27, 2008 $quotes = array( 'This is my quote', 'Another quote', 'Another line' ); Is it possible to use a variable in this array? if so, can someone show me the right way to do it? I keep receiving error. I have these variables $GLOBALS["nav"] $GLOBALS["ver"] I'm going to write an if statement, but i don't know the right syntax format. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/134445-syntax-error-in-an-array/ Share on other sites More sharing options...
DeanWhitehouse Posted November 27, 2008 Share Posted November 27, 2008 <?php $quotes = array( $var1, $var2, $var3 ); ?> Yes? This may help http://djw-webdesign.awardspace.com/code.php?snippet=8 Quote Link to comment https://forums.phpfreaks.com/topic/134445-syntax-error-in-an-array/#findComment-699967 Share on other sites More sharing options...
Philip Posted November 27, 2008 Share Posted November 27, 2008 I keep receiving error. What error are you getting? Quote Link to comment https://forums.phpfreaks.com/topic/134445-syntax-error-in-an-array/#findComment-700009 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.