hello!
im having a little problem with showing my database results.
i have two collums named
'artist_1' and 'artist_2'.
what i want is to show 1st artist name and 2nd artist name (but only if there is one!!) and it MUST be formatted like this:
1st artist / 2nd artist
but if there is only one artist then like this:
1st artist (without slash '/')
i tried to write code that looks like this:
// connection to database and all other stuff //
echo $row["artist_1"];
if (is_null($artist_2))
{
echo "<br>";
}
else
{
echo " / ";
echo $row["artist_2"];
echo "<br>";
}
// other stuff //
AND IT WON'T WORK!!! the result is only 1st artist name!
can someone please help me? what am i doing wrong?
i know this is very small problem but im new in php and i still don't know lots of things... please help!