# PHP: fwite "" into textfile

**URL:** <https://forum.kirupa.com/t/php-fwite-into-textfile/27865>\
**Category:** programming\
**Created:** [August 7, 2003, 11:44am UTC](https://forum.kirupa.com/t/php-fwite-into-textfile/27865 "2003-08-07T11:44:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danneman](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@Danneman](https://forum.kirupa.com/u/Danneman)\
**Post date:** [August 7, 2003, 11:44am UTC](https://forum.kirupa.com/t/php-fwite-into-textfile/27865/1 "2003-08-07T11:44:44Z")

</div>

Hi!

Im using a simple PHP-script to write to a textfile.

Problem is I want to include the symbol " into the textfile.

Im using the code:

```php

fwrite($FilePointer, "<a href=".$LinkOne.">".$LinkNameOne."</a>" );

```

And the textfile will display:

```php

<a href=http://www.myLink.com>myLink</a>

```

What I want in the textfile is the following line (including the “”):

```php

<a href="http://www.myLink.com">myLink</a>

```

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 7, 2003, 1:06pm UTC](https://forum.kirupa.com/t/php-fwite-into-textfile/27865/2 "2003-08-07T13:06:36Z")

</div>

you have to escape the characters using \ so your code would look like this:

```php

fwrite($FilePointer, "\"".$LinkNameOne."\"");

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 7, 2003, 3:21pm UTC](https://forum.kirupa.com/t/php-fwite-into-textfile/27865/3 "2003-08-07T15:21:25Z")

</div>

Sorry about not putting the code in code-area. Its correct now.

Thanks Jubba, that works great 🙂
