Jump to content

how can i have more than one value in a variable?


Darkwoods

Recommended Posts

im trying to have different values but i don't know how to separate them, i tried with , . 'AND' but still not working with me i googeled it but could not find any examples thanks  :-[

 

<?php
if($var == 'value1' or 'value2' or 'value3') {  
echo 'Lets echo it!'; }
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.