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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:33:21+00:00 2026-06-06T17:33:21+00:00

Re-reading a bit about php basics, as to refresh some things and to be

  • 0

Re-reading a bit about php basics, as to refresh some things and to be more accurate when coding, I tried to print <? in a string with the print function and noticed that I cannot find a way to do it.

I am a bit confused because reading about the difference between singe and double quotes, I thought that the only characters needing a special treatment inside single-quoted strings were the backslash and the single quote (as in O’Reilly literature).

Of course, the <? is not any kind of character string but I was wondering how could I print it inside of a string.

I tried to escape it, to put it in a variable, to use here document but without any success.
Actually looking at the source code in Firefox, I can see the characters are but they’re just not displayed.

Here is my test-string:

print 'No space between <? and php if you want to avoid errors!';

I suspect it to be very basic but still I guess that getting all the basics perfectly straight is the way to go, so here I am.

  • 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-06T17:33:24+00:00Added an answer on June 6, 2026 at 5:33 pm

    This isn’t a PHP problem. HTML interprets it as a strating of a tag and renders it as HTML. See the page’s source.

    Solutions

    • Either replace < with &lt;
    • Or use htmlspecialchars()
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading a bit more about how Gnutella and other P2P networks function, I
I've been reading a bit about immutable structures such as string. Simply put, they
Im skinning a progressBar in Flex, and after reading a bit about it, I
I've been reading a fair bit about the performance of using LINQ rather than
So I've been reading quite a bit about Unicoding tonight because I was thinking
I´m a little bit confused by reading all the posts and tutorials about starting
Been reading a bit about the subject, and out of curiosity, online games which
I've been reading a bit about functional programming recently and am keen to get
I was just reading a bit about the HQ9+ programming language: https://esolangs.org/wiki/HQ9+ , https://en.wikipedia.org/wiki/HQ9+
I've been reading a bit about document design for MongoDB, specifically relating to referencing,

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.