-2
    $tweet = $row['pledge'] $row['fname'];
{
echo "$tweet";
}

Parse error: syntax error, unexpected T_VARIABLE

ADMob
  • 1
  • 1

2 Answers2

3

Use concatenation operpator

  $tweet = $row['pledge'].$row['fname'];
  {
     echo "$tweet";
  }
웃웃웃웃웃
  • 11,829
  • 15
  • 59
  • 91
  • 1
    @ADMob It's also interesting to note that you can do this with both `$tweet = $row['pledge'].$row['fname'];` or this `$tweet = $row['pledge'] . $row['fname'];`. The only difference being the spaces either side of the concatenation operator. I personally use spaces for readability, but it's all down to personal preference. – The Humble Rat Jan 02 '14 at 11:52
  • Thank you guys, you are great! I finally achieved what i wanted through everyone's help here. I can now have form to twitter script – ADMob Jan 02 '14 at 11:56
0
$tweet = $row['pledge'] . $row['fname'];

Now ECHO

echo $tweet;
box.around
  • 69
  • 1
  • 8