I know there is a better way of doing this using ifelse but I can not get it to work... I feel as if I am just writing too much code to do some simple task... can someone help me with a better way of doing this?
Code: Select all
<?php
if (!$name) {
echo "<center>The product you requested is no longer available. Please feel free to look around at some our other great products.</center>";
}
else {
echo "Product:";
}
?>
</b></font>
<font color="#000000" size="-1" face="Arial, Helvetica, sans-serif">
<?php
if (!$name) {
echo " ";
}
else {
echo "$name";
}
?>
</font>
<font color="#6B1810" size="-1" face="Arial, Helvetica, sans-serif"><b>
<?php
if (!$name) {
echo " ";
}
else {
echo "<br>";
}
?>
</b></font>
<!--End Name -->Code: Select all
<!--Artist -->
<font color="#6B1810" size="-1" face="Arial, Helvetica, sans-serif"><b>
<?php
if (!$art) {
echo " ";
}
else {
echo "Artist:";
}
?>
</b></font>
<font color="#6B1810" size="-1" face="Arial, Helvetica, sans-serif"><b>
<?php
if ($art=Unknown) {
echo " ";
}
else {
echo "Artist: ";
}
?>
</b></font>
<?php
if ($art=Unknown) {
echo " ";
}
else {
echo "$artist";
}
?>
<?php
if (!$art) {
echo " ";
}
else {
echo "$artist";
}
?>
<?php
if (!$art) {
echo " ";
}
else {
echo "<br>";
}
?>
<!--End artist -->