User Profile

Collapse

Profile Sidebar

Collapse
prasadedathil
prasadedathil
Last Activity: Feb 12 '07, 07:12 AM
Joined: Feb 1 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • for adding a new line caharacter in a string, concatenate the string with a \n enclosed in double quotes.
    eg: $string="new employee"."\n";
    fwrite($fptr, $string);
    This will write the contents of the string '$string' in to the file and take the cursor to the next line of the file.
    So, when you execute the foll: code,
    $emp_name="John ";
    fwrite($fptr, $emp_name);...
    See more | Go to post

    Leave a comment:


  • prasadedathil
    started a topic adding a new line character in a string.
    in PHP

    adding a new line character in a string.

    Hi friends

    I need to write s string into a log file a string each time I run my php script.

    How could I write the details into a new line each time I run.

    I tried using \n but it is not working.....
    eg:
    $logdetail= "date: ".$todate.$coun t."values inserted\n";
    fwrite($fptr, $logdetail);

    THIS IS VERY URGENT Friends
    See more | Go to post
No activity results to display
Show More
Working...