Solved

PHP

Posted on 2011-03-19
2
610 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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

803 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