User Profile

Collapse

Profile Sidebar

Collapse
CMNetworx
CMNetworx
Last Activity: Jan 20 '07, 09:02 AM
Joined: Jan 20 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • How do I remove extra lines out of text before it is written to a file..

    ok, so I am grabbing a file off of my server, and I strip out all of the html tags and extra crap that I don't want, and write it to a text file, however the content that makes it to the file still looks something like this

    value

    value2

    and sofourth, I have tried using trim to remove the extra hard returns, but no luck
    [php]
    $theData = trim($theData, "\r");
    $theData = trim($theData,...
    See more | Go to post

  • CMNetworx
    replied to Comparing Dates
    in PHP
    This wont let me edit since its past 5 min, so I will repost

    Here is one way, it requires that your dates are entered in by the unixtime function, which they may already be, and they may be translated out of..

    [php]
    $nice_post = date('F d Y', $this);
    //This will return the variable $this from unix time to a readable date

    $unixtime = strtotime('now' );
    //makes current time into unix...
    See more | Go to post

    Leave a comment:


  • CMNetworx
    replied to Comparing Dates
    in PHP
    Here is one way, it requires that your dates are entered in by the unixtime function

    [php]
    $unixtime = strtotime('now' );

    mysql_select_db ("yay") or die(mysql_error ());
    $query = "SELECT * FROM tablename WHERE this = '$that' AND expires_on >= '$unixtime'"; [/php]

    expires_on is one of the column names so in yours it may be

    [php]AND listed >= '$unixti...
    See more | Go to post

    Leave a comment:


  • CMNetworx
    replied to confirm previously entered email address
    in PHP
    [php]
    if ($_POST['email'] != $_POST['email_again']) {
    die('Your emails did not match');
    }
    [/php]
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...