Hello,
It’s me again and need help with this one. I’m sure is not something hard but can’t do it alone. So now I have title like this
<title><?php echo $caption;?></title>
But if there is no $caption in database I get the URL of page instead. How to chek if there is no title to show something static ‘No title’ for example?
Also I have something strange in output of facebook meta tags. This is how I get image path:
The second problem: it seems that $file_path contains a relative path.
For both problems: are you using a template system? You’ll have to find the part of the script that actually puts the values in $caption and $file_path and operate on that code.
[ot]I always used isset() but looks as though empty() is better because not only does it return FALSE for a variable not set it also caters for empty variables.
[/ot]