www.webdeveloper.com
Results 1 to 3 of 3

Thread: Problem with writing variable to .txt extension

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    Problem with writing variable to .txt extension

    Hello everyone ,
    i have this problem
    i want to have the name of the .txt file to be the name of my $title variable
    so for instance if my variable of $title is test then the txt file should be named test.txt file

    here some code:

    Code:
    $filename = $titel.txt; // this isnt working ofcourse
    $create = fopen($filename, "w"); //uses fopen to create our file.
    someone any ideas?

    Thx

  2. #2
    Join Date
    Mar 2011
    Posts
    1,109
    $filename = $title . '.txt';
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Jun 2012
    Posts
    2
    Ty that did the trick

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles