2011-08-02 2 views
0

누군가가 PHP 내부 이메일 html

'을 (를) 설명해 주실 수 있습니까? $ 엔딩. '!

'와 같은 방식으로 작동하지 않습니다. $ 인사말. '! 다음 코드에서

? 내가 누락 된 것은 무엇인가?

    $salutation = 'Greetings, ' . $cname; 
       $ending = 'Thank you for using HammerPins, ' . $cname; 

       $subject = 'Hammerpins.net Alert: Newly Added Bowling Tournaments'; 
       $message = ' 
       <html> 
       <body> 
        <p>' . $salutation . '!</p> 
        <p>New tournaments were added to the HammerPins database this week in the following counties:</p>'; 
        foreach ($user_array as $single_user_item) { 
         $message .= "$single_user_item[link]"; 
        }' 
        <p>' . $ending . '!</p> 
       </body> 
       </html> 
       '; 

감사합니다.

답변

3

foreach 루프 바로 전에 원본 문장을 종료했기 때문에. 대신이 시도 :

   $salutation = 'Greetings, ' . $cname; 
      $ending = 'Thank you for using HammerPins, ' . $cname; 

      $subject = 'Hammerpins.net Alert: Newly Added Bowling Tournaments'; 
      $message = ' 
      <html> 
      <body> 
       <p>' . $salutation . '!</p> 
       <p>New tournaments were added to the HammerPins database this week in the following counties:</p>'; 
       foreach ($user_array as $single_user_item) { 
        $message .= "$single_user_item[link]"; 
       } 
       $message .= '<p>' . $ending . '!</p> 
      </body> 
      </html> 
      '; 
+0

나는 그렇게 생각하지 않습니다.! 나는 이미 그것을 시도했지만 생각하지 않았다. 도움을 주셔서 대단히 감사합니다! –

1

을 당신은 $ 메시지를 놓치고 = foreach 문의} 마감 후