vin301 Posted June 24, 2006 Share Posted June 24, 2006 I saw somewhere that you can assign HTML to a variable doing something like the following:$var <<< EOF ?> HTML tags and "quotes" and 'quotes' <?EOF .?>ANY THOUGHTS? Link to comment https://forums.phpfreaks.com/topic/12813-assign-html-to-variable-using/ Share on other sites More sharing options...
.josh Posted June 24, 2006 Share Posted June 24, 2006 [a href=\"http://us2.php.net/heredoc\" target=\"_blank\"]http://us2.php.net/heredoc[/a] Link to comment https://forums.phpfreaks.com/topic/12813-assign-html-to-variable-using/#findComment-49124 Share on other sites More sharing options...
kenrbnsn Posted June 24, 2006 Share Posted June 24, 2006 That syntax is the "heredoc" syntax and is described in the [a href=\"http://www.php.net/heredoc\" target=\"_blank\"]fine manual[/a].Here is a brief example pulled from the manual:[code]<?php$str = <<<EODExample of stringspanning multiple linesusing heredoc syntax.EOD;?>[/code]Ken Link to comment https://forums.phpfreaks.com/topic/12813-assign-html-to-variable-using/#findComment-49126 Share on other sites More sharing options...
vin301 Posted June 24, 2006 Author Share Posted June 24, 2006 THANK YOU!!!![!--quoteo(post=387511:date=Jun 24 2006, 01:17 PM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Jun 24 2006, 01:17 PM) [snapback]387511[/snapback][/div][div class=\'quotemain\'][!--quotec--]That syntax is the "heredoc" syntax and is described in the [a href=\"http://www.php.net/heredoc\" target=\"_blank\"]fine manual[/a].Here is a brief example pulled from the manual:[code]<?php$str = <<<EODExample of stringspanning multiple linesusing heredoc syntax.EOD;?>[/code]Ken[/quote] Link to comment https://forums.phpfreaks.com/topic/12813-assign-html-to-variable-using/#findComment-49129 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.