Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:30:38+00:00 2026-06-18T09:30:38+00:00

I’ve got a .php script. In a variable I have a added html, but

  • 0

I’ve got a .php script. In a variable I have a added html, but in that html I want to get text from another variable, how do I do this?

This is the variable with html:

$ai_boc   = '
<html>
<head>
  <title>Notes by Douno</title>
</head>

<body>
<div align="center">
<div style="width:600px; height:auto; border-radius:10px; background-color:#F7F1B8; background-repeat: auto; font-family:Georgia;  color:#513414;">

    <div style="height:100px; padding-top:20px; padding-left:20px; text-align:left;">
    <p style="margin-bottom:0px; font-weight:bold; font-size:xx-large;">$ai_su</p>
    <p style="margin-top:5px; font-size:x-small; font-weight:bold;">$ai_da</p>
    </div>
        <div style="height:1px; background-image: url(http://dl.dropbox.com/u/99775621/divider.jpg); display:block; position:relative;">
        </div>
    <div style="position:relative; overflow:hidden;">

        <div style="height:auto; width:375; padding-left:20px; text-align:left; position:relative; float:left;">
            <div style="width:375px;"> <p style="font-size:x-small; font-weight:bold;"><?php echo $ai_bo?></p>
            </div>
        </div>

        <div style="height:auto; width:160px; padding-left:20px; padding-right:20px; text-align:left; position:relative; float:left;">
        <p style="font-size:x-small; font-weight:bold; vertical-align:bottom;">If this email is considered spam, please contact us.</br></br>This email was send via Notes. An Android app developed by Douno.</p>
        <a href="https://play.google.com/store/apps/details?id=appinventor.ai_L_Bogaerts_95.Notes">
        <img alt="Get it on Google Play"
        src="https://developer.android.com/images/brand/en_generic_rgb_wo_45.png" />
        </a>

        </div>

    </div>
        <div style="height:1px; background-image: url(http://dl.dropbox.com/u/99775621/divider.jpg); display:block; position:relative;">
        </div>
    <div style="height:100px; width:600px; display:inline-block; position:relative;">

    </div>      






</div>
</div>
</body>
</html>
';

I coudn’t find any working explanation, so I hope someone here can help me further. The html is not finished… Still some changes I’m gonna make.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:30:40+00:00Added an answer on June 18, 2026 at 9:30 am

    Use either string concatenation, or variable expansion:

     $html = '<html>'.$somevar.'</html>';      // concatenation
     $html = "<html>$somevar</html>";           // expansion, only works with double quotes (")
    

    But much better is to use a decent template system to separate HTML and PHP altogether.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want to count how many characters a certain string has in PHP, but
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a text area in my form which accepts all possible characters from
I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.