dtyson2000 Posted March 25, 2010 Share Posted March 25, 2010 Hello. A quick question because I'm not sure that I'm finding what I need when I Google (or search these fora). I was just wondering if it's possible to assign multiple (three) potential values to one variable. This is what I initially tried: $variable = ("value1" || "value2" || "value3"); Of course that didn't work. Is there a way to do such a thing - assign the same variable name to a few different values? Sorry, if the answer was right in front of my nose and I didn't see it. Have a good one! Link to comment https://forums.phpfreaks.com/topic/196527-variable-with-multiple-potential-values/ Share on other sites More sharing options...
Pawn Posted March 25, 2010 Share Posted March 25, 2010 Arrays? Link to comment https://forums.phpfreaks.com/topic/196527-variable-with-multiple-potential-values/#findComment-1031822 Share on other sites More sharing options...
gwolgamott Posted March 25, 2010 Share Posted March 25, 2010 $variable = array("Value1", "Value2","Value3"); Link to comment https://forums.phpfreaks.com/topic/196527-variable-with-multiple-potential-values/#findComment-1031823 Share on other sites More sharing options...
dtyson2000 Posted March 25, 2010 Author Share Posted March 25, 2010 That did it... Thank you! Link to comment https://forums.phpfreaks.com/topic/196527-variable-with-multiple-potential-values/#findComment-1031908 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.