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 7683085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:42:56+00:00 2026-05-31T18:42:56+00:00

How to insert html code inside an array in PHP? I tried searching on

  • 0

How to insert html code inside an array in PHP?

I tried searching on internet but found nothing.

$html = array
('<IFRAME src="http://link1.com" width="1" height="1" 
scrolling="auto" frameborder="0"></IFRAME>' ,

'<IFRAME src="http://link2.com" width="1" height="1" 
scrolling="auto" frameborder="0"></IFRAME>' ,

'<IFRAME src="http://link3.com" width="1" height="1" 
scrolling="auto" frameborder="0"></IFRAME>');
print_r ($html);

When I tried to print_r, there was no result.

  • 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-05-31T18:42:58+00:00Added an answer on May 31, 2026 at 6:42 pm

    There is no result because you are giving the output to the browser, which happily places three <iframe>s with invalid source URLs in your page. So you see nothing for the same reason you would see nothing if you did print '<p></p>';.

    If you view the page source you will see your HTML is there.

    Normally to see HTML markup as “plain text” you would need to pass it through htmlspecialchars — however, that function works with strings and here you have an array. So if you want to print the contents as human-readable text, you need to do something fancier and use array_map:

    print_r(array_map('htmlspecialchars', $html));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how to insert this javascript code : thejavascript <A HREF=javascript:void(0) onclick=window.open('welcome.html','welcome')> </A> inside img
I'm using jQuery to insert text inside a HTML tag. The HTML code looks
On the manual page; http://dev.mysql.com/doc/refman/5.0/en/mysql-insert-id.html It is said that Returns the value generated for
How can I insert jquery inside an html tag like using it in onclick
I want to insert something inside the modal window using Ajax, so I tried
I have the following html code. It works when using one H tag inside
Trying to use the following code to insert a google ad inside of a
I want to insert a variable inside the EOT but is not working (I
In this php code I use the heredoc EOF to insert some javascript: $room=
I need to insert html code like this in my zend form: <div class=myClass1

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.