Jump to content
php.lv forumi

ka pareizi lietot ECHO ?


thoth

Recommended Posts

Piedodiet ja iepoustoju nepareizaja topika... bet es nezinaju kura sitas jaliek.

 

Kada veida es ar Echo varu izvadit so ...

 

<div id="nav1" style="position:absolute; left:84px; top:103px; z-index:1"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav10','','images/nav152434060a.gif',1)" href="#"><img name="nav10" onLoad="MM_preloadImages('images/nav152434060a.gif')" alt="" border=0 src="images/nav152434060i.gif"></a></div>;

 

nesanak izmantojot echo " " un ari echo ' '... vai ir vel kads veids ???

Link to comment
Share on other sites

A priekškam izvadīt ar echo, ja strings ir konstants un nav atkarīgs no mainīgajiem?

?>
<div id="nav1" style="position:absolute; left:84px; top:103px; z-index:1"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav10','','images/nav152434060a.gif',1)" href="#"><img name="nav10" onLoad="MM_preloadImages('images/nav152434060a.gif')" alt="" border=0 src="images/nav152434060i.gif"></a></div>;
<?php

Link to comment
Share on other sites

  • 2 weeks later...

echo('<div id="nav1" style="position:absolute; left:84px; top:103px; z-index:1"><a onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'nav10\',\'\',\'images/nav152434060a.gif\',1)" href="#"><img name="nav10" onLoad="MM_preloadImages(\'images/nav152434060a.gif\')" alt="" border=0 src="images/nav152434060i.gif"></a></div>');

 

' => \'

Edited by SkaKri
Link to comment
Share on other sites

×
×
  • Create New...