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 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 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? 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
Archived
This topic is now archived and is closed to further replies.