473,320 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to force php to don't read $text$ as a variable ?

how to force php to don't read this >> $text$ as a variable ? and just print it to HTML code as it $text$

when i try to add $text$ it doesn't appear in html source because php read it as a variable how to disable just this certain word >>> $text$
Dec 8 '09 #1
2 1418
Atli
5,058 Expert 4TB
Hey.

PHP only parses variables in double-quoted strings, not single-quoted strings. And you can always use the back-slash (\) to escape the $ char in double-quoted strings if you need it printed rather than parsed.
Expand|Select|Wrap|Line Numbers
  1. // Here PHP will parse the variable and 
  2. // replace it with it's value.
  3. echo "Text: $text";
  4.  
  5. // But not in either of these.
  6. echo "Text: \$text";
  7. echo 'Text: $text';
  8.  
Dec 8 '09 #2
Thanks Atli it was useful answer
Dec 8 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: steve | last post by:
Dont’ make my mistake. It is costly. Say you have defined a variable $var in your main script. Now in a function you access it using: global $var; But you want to set it to null inside the...
53
by: Bill | last post by:
Hello Programmers, I am looking for either Java Script (OR HTML etc) to DEFEAT Pop-up Stoppers e.g It will bring up a window that will LOOK like a Pop-up FEEL like a Pop-up Allow a name and...
43
by: Patrick Laurent | last post by:
Hello I have a program with many many inlined template functions It is essential for the execution speed that every (or almost every) function marked as inlined, becomes really inlined by the...
5
by: Rob Mayo | last post by:
How can I force a MeasureItem message for an owner-dramn menu item? Here is the dilemma. I wrote a lovely little Component for owner-drawing all the menus on a form and making them look like...
3
by: xscully | last post by:
Is there a way to force the user to read a textarea? Just like those 'agreements' that is used in a few offline instalation.. You have to scroll all the way down of the textarea and then the I...
2
by: James Hallam | last post by:
Hi, I'm having trouble getting a conditional force (namely friction) using VB6. I have had no problem using constant or periodic forces. The trouble seems to be that when defining the later...
0
by: peter.c.bradley | last post by:
Hi folks, I have an Access report that has an unbound text box in the details section. The report also includes the standard headers and footers. The details section is populated by a query...
0
by: Josetta | last post by:
Here is something really bizarre that is happening...let me see if I can describe it. I have a report which has two locations on it. Primary Location and Secondary Location. I have both...
6
by: Per Juul Larsen | last post by:
Hi. My Textfile looks like this Variable 1 Variable 2 Variable 3 Variable 4 On opening the application it will read the textfile, and assign each line of variable to at textfield in VB and...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.