PHP Classes

Calling PHP Variables Within OpenGraph Meta Data For Facebook

Recommend this page to a friend!

      Top level forums  >  PHP Specialists  >  General  >  Calling PHP Variables Within...  
Subject:Calling PHP Variables Within...
Summary:I'm trying to call a variable, but am unsure correct syntax
Author:Gareth Wilson
Date:2014-02-11 21:36:39
Update:2014-02-12 03:57:38

  1. Calling PHP Variables Within...   Reply   Report abuse  
Gareth Wilson - 2014-02-12 03:57:38

I'm trying to pass a variable from my php script on the page into the og;metadata, but on the timeline all that is shown is the standard html metadata, am I using the correct php code to call the variable so that it shows up on the timeline?

<meta property="og:title" content="<?php $_GET['$title']; ?>"/>

the title variable comes from here;

$title = urlencode("Take The Test!");

Any help on this is much appreciated, Gareth