Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP

Posted on 2011-03-19
2
Medium Priority
?
616 Views
Last Modified: 2012-05-11
hi experts,

Supposing i have:

$test="blablabla";

what is the corect syntax for writing in the file param=blablabla   ?

$file=file_put_context("test.txt", "param=$test");

or

$file=file_put_context("test.txt", "param='$test'");

Thank you in advance.

Regards,
Raul

0
Comment
Question by:raulmonda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
ncoo earned 2000 total points
ID: 35171402
Single quotes are best, it's less processing. But on such a small example there is very little in it.
$file=file_put_context('test.txt', 'param='.$test);

Open in new window

0
 

Author Closing Comment

by:raulmonda
ID: 35171406
Thank you.
Much appreciated.

Regards,
Raul
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question