2012-08-23 48 views
0

我的代碼把那已經包含在陣列

array("name" => "Services Widget Description", 
     "desc" => "Max 500 character(Use new line for new Point)", 
     "std"=>"<ul> 
        <li> 
      Rebum corrumliit neglegentur sit at, 
      <img class='line22' width='243' height='2' alt='text line' src='images/text-line.jpg'> 
     </li> 
       </ul>" 
), 

URL是包含http://localhost/Junk變量變量中圖像的URL,我想用裏面的src這個變量,我已經試過這樣

array("name" => "Services Widget Description", 
     "desc" => "Max 500 character(Use new line for new Point)", 
     "std"=>"<ul> 
        <li> 
      Rebum corrumliit neglegentur sit at, 
      <img class='line22' width='243' height='2' alt='text line' src=URL.'images/text-line.jpg'> 
     </li> 
       </ul>" 
), 

,但沒有用,請大家指導如何使用它

回答

0

URLCONSTANT不是一個變量。

集成URL代碼".URL."

array("name" => "Services Widget Description", 
     "desc" => "Max 500 character(Use new line for new Point)", 
     "std"=>"<ul> 
        <li> 
         Rebum corrumliit neglegentur sit at, 
         <img class='line22' width='243' height='2' alt='text line' src='".URL."images/text-line.jpg'> 
        </li> 
       </ul>" 
), 
+0

感謝名單親愛的,它的作品,我總是面對困難做這樣的嵌套,你可以參考我在哪裏可以整合變量閱讀語法 – Ankit

+0

我猜的http:// PHP。淨/手動/ EN/language.types.string.php是好的。 –