ecabrera Posted February 20, 2012 Share Posted February 20, 2012 what does this mean .= for example is say this somewhere and i try it here and it work why? and if i remove it it doesn't work <?php require "scripts/connect.php"; $query = mysql_query("SELECT * FROM page"); while ($rows = mysql_fetch_assoc($query)){ $pageid = $rows['id']; $pagetitle = $rows['pagetitle']; $pagebody = $rows['pagebody']; $tableOutput .= "<tr>"; $tableOutput .= "<td align='center'><strong>$pagetitle</strong></td>"; $tableOutput .= "</tr>"; } mysql_close(); ?> Quote Link to comment Share on other sites More sharing options...
Infected.Shadow Posted February 20, 2012 Share Posted February 20, 2012 It's a string operator used to concatenate strings. http://php.net/manual/en/language.operators.string.php Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 20, 2012 Share Posted February 20, 2012 $foo = 'b'; $foo .= 'a'; //Concatenate 'a' to current value $foo .= 'r'; //Concatenate 'r' to current value echo $foo; //Output: bar $foo = 'b'; $foo = 'a'; //Replace current value with 'a' $foo = 'r'; //Replace current value with 'r' echo $foo; //Output: r Quote Link to comment Share on other sites More sharing options...
ecabrera Posted February 20, 2012 Author Share Posted February 20, 2012 thanks i get it thanks alot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.