Hi Guys,
I am trying to create an IF statement that will show text only if the parent exists.
I have made a start to but when the page does have the third parent as such it still shows the else statement.
Can anyone help please?
$parents = $resort->parents;
echo $parents[2]->title;
if ($resort->has_parent[3]) {
echo ", ";
echo $parents[3]->title;
}
else {
echo "test";
}
Thanks in advance,
Mel