php heredoc syntax question

Posted by timpone on Stack Overflow See other posts from Stack Overflow or by timpone
Published on 2010-06-07T23:43:23Z Indexed on 2010/06/07 23:52 UTC
Read the original article Hit count: 330

Filed under:

Trying to output the following 5 but not sure how to do it. Any ideas?

<?php

$other='What are you like?';
 $content['my_name']=4;

$str=<<<JT
    here is some info. $other Do 
    you like the number {$content['my_name']+1} ? 
JT;

 echo $str . '<br />';

© Stack Overflow or respective owner

Related posts about php