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(); ?> Link to comment https://forums.phpfreaks.com/topic/257401--/ 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 Link to comment https://forums.phpfreaks.com/topic/257401--/#findComment-1319303 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 Link to comment https://forums.phpfreaks.com/topic/257401--/#findComment-1319314 Share on other sites More sharing options...
ecabrera Posted February 20, 2012 Author Share Posted February 20, 2012 thanks i get it thanks alot Link to comment https://forums.phpfreaks.com/topic/257401--/#findComment-1319322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.