Sign in to follow this  
Followers 0
Alek

how can i make filewrite write "test"?

3 posts in this topic

how can i make filewrite write "test" and not just test??


[font="Impact"]Never fear, I is here.[/font]

Share this post


Link to post
Share on other sites



Or """test""" even.

If you want quotation marks in a string, you either have to wrap the string with other quotes (both ' and " can be used to wrap a string), or double them up.

xcal has provided an example using a single-quote wrapped string, with the double quotes inside.

A more legible example:

$string = 'Bob said, "Hello!" to his neighbour.'oÝ÷ ØÌÅ©©è¬ºÈ§§h¹¹^ªê-{
Ú¦²Úâ"¶h¹¹^vê]¢æåz«¨µë"Èzj,¶Ø¦zÂ7ö÷®±çjº]¢æåz«¨¶)èëקqâ-)䢩¨­é^&åyìZ^jëh×6$string = "Bob said, ""Hello!"" to his neighbour."oÝ÷ Ø   Ý·
&¢·Å©©ë0Ølx%z«¨µë"Èy«­¢+ØÀÌØíÍÑÉ¥¹ôÌäìÅÕ½Ðí%ÐÌäìÌäí̹½ÐÑ¡ÍÐ$ÌäìÌäíÙ½¹°ÅÕ½ÐìÍ¥M±±ä¸ÌäììÍ¥¹±µÅÕ½ÑÝÉÁÁ(ÀÌØíÍÑÉ¥¹ôÅÕ½ÐìÅÕ½ÐìÅÕ½Ðí%ÐÌäí̹½ÐÑ¡ÍÐ$ÌäíÙ½¹°ÅÕ½ÐìÅÕ½ÐìÍ¥M±±ä¸ÅÕ½Ðìì½Õ±µÅÕ½ÑÝÉÁÁ

Personally, I usually enclose my strings with ' instead of " because I'm used to PHP where there's a significant difference between the two.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0