[solved] if then show problem
Posted: Mon Feb 16, 2004 11:59 am
My problem is the following: I have an open jobs database that the user seleclts the open job and the results are shown. However, I would like the heading "Experience" to show only if there is info in "Required Experience" or "Preferred Experience" or "Other Experience" fields (true in one or all)
Here is my code that I cannot get to work:
I would appreciate some help on this, as I have been trying to get this to work for days!!!
Thank you!
Here is my code that I cannot get to work:
Code: Select all
<?php
if ($positions['r_experience' || 'p_experience' || 'o_experience']) {
echo '<b>Experience </b><br><br> ';
}
if ($positions['r_experience']) {
echo '<blockquote><b>Required:<br></b> ' .$positions['r_experience'] . '<br></blockquote>';
}
if ($positions['p_experience']) {
echo '<blockquote><b>Preferred:<br></b> ' .$positions['p_experience'] . '<br></blockquote>';
}
if ($positions['o_experience']) {
echo '<blockquote><b>Other:<br></b> ' .$positions['o_experience'] . '<br></blockquote>';
}
?>Thank you!