Solved

PHP

Posted on 2011-03-19
2
607 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
2 Comments
 
LVL 15

Accepted Solution

by:
ncoo earned 500 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
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…
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 look for a specific file type in a local or remote server directory using PHP.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now