Jump to content

Simple PHP String Concatenation


samsbc12

Recommended Posts

define('TEXT_MAIN', '<style type="text/css">

<!--

.style4 {font-size: small}

--><br>

<!--

    p {

      text-indent: 2.0em;

    }

  -->

</style>

<div align="left">

  <p>

  <img src="/images/mainpage.jpg" hspace="15" align="left">' . str_replace("\r\n", "<br>", stripslashes($row['Text']))  //i WANT TO INSERT THIS FUCTION HERE THEN CONTINUE THE STRING

  </div>

</html>

');

Link to comment
https://forums.phpfreaks.com/topic/55193-simple-php-string-concatenation/
Share on other sites

Im not sure it would even work within a constant declaration, but...

 

<?php

define('TEXT_MAIN', '<style type="text/css">
<!--
.style4 {font-size: small}
-->

<!--
    p {
      text-indent: 2.0em;
    }
  -->
</style>
<div align="left">
  <p>
  <img src="/images/mainpage.jpg" hspace="15" align="left">' . str_replace("\r\n", "", stripslashes($row['Text'])) . '
  </div>
</html>
');
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.