This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integrating FBML and PHP in my facebook app?
02-19-2014, 12:42 PM
Post: #2
 
There are a few problems. First, you need quotes around your number. That's less important, because since $start is outside of PHP scope, it's being parsed just like regular HTML, which doesn't recognize $start, of course. There are a number of ways to do this.

1) Add PHP scope around your variable:

<fb:time t="<?= $start ?>" tz="America/New_York" />

2) Extend your overall scope to include the HTML code, but output it through PHP:

<?php
$start = 23434;

echo "<fb:time t=\"$start\" tz=\"America/New_York\" />";

OR

echo '<fb:time t="'.$start.'" tz="America/New_York" />';
?>

This is pretty simple PHP knowledge, so I'm under assumption you don't know PHP very well. I'd suggest that trying to make a Facebook app is not the best way to learn.

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[] - SkaNinja - 02-19-2014 12:42 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)