i need php based if loop where i can in Joomla 1.5 HTML insert php code to find author and when i get that variable i can make IF statement
for example
if ($author="a") {
echo "This is author a";
}
elseif ($author="b"){
echo "this is author b";
}
elseif ($author="c"){
echo "this is author c";
}
I do not know how get $author variable (name) from article
You should use ==
or ===
instead of =
in if statements
Example
if ($author == "a") {
echo "This is author a";
}
elseif ($author == "b") {
echo "this is author b";
}
elseif ($author == "c") {
echo "this is author c";
}
Or Use Switch
switch ($author) {
case "a" :
echo "This is author a";
break;
case "b" :
echo "This is author a";
break;
case "c" :
echo "This is author a";
break;
}