Jump to content


  • Posts

  • Joined

  • Last visited

About Stooney

  • Birthday 05/30/1988

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Las Cruces, NM

Stooney's Achievements

Advanced Member

Advanced Member (4/5)




Community Answers

  1. While your last comment was quite rude, it looks like you're trying to find out how to name a variable based on another variable's value. Here is the answer to that question: http://php.net/manual/en/language.variables.variable.php The fact still remains that your DB design is bad and should be reworked.
  2. I'm curious what he thinks the 'OOP relacements' for if/switch are.....
  3. $data = file('file.txt'); //Reads file into array, each line has it's own element echo $data[0].'<br />'; //Output without a line number for($i=1; $i<=(count($data)-2); $i++){ //Starts at the second element of array echo $i.' '.$data[$i].'<br />'; //You can change this to save into a file if necessary }
  4. This: $cntAll < 2 doesn't seem like it would be doing this: the total number of people signed up is less than 25 unless you remitted some stuff to make the question simple.
  5. I agree with shlumph. If landscape, width = original width - (original height - 24). Then use whatever library you use to crop the image to 24x24, most likely wanting to trim the edges and keeping the center most 24 pixels.
  6. Your PHP installation is trying to send email through a local SMTP server that probably doesn't exist. You either need to point your php install to a working SMTP server or set up a local one.
  7. While this belongs on the Misc board, there are plenty out there. Here's a list of some: http://designbeep.com/2011/06/28/18-useful-web-based-code-editors-for-developers/
  8. You can just type the local ip address of the server into your browser's address bar. This is assuming you're connect to the same local network at the server.
  9. The second one was the more proper method anyway
  10. you're second line with $date1 is what's killing it. Just do $date = date("Y-m-d", strtotime("+90 days")); Also, if it's just a simple database thing, you can do $query1 = "UPDATE testdate SET end = (now() + INTERVAL 90 DAY) WHERE id=1";
  11. you could go kinda ghetto, and do something like <?php $data='stufwlkef weljflwkejflwfjwf src=\'http://www.youtube.com/v/rifw235SG\"><etc etc tec...'; $start_pos=strpos($data, 'http://www.youtube.com'); $end_pos=strpos($data, '\">', $start_pos); $link=substr($data, $start_pos, ($end_pos - $start_pos)); echo $link; ?>
  12. This may cause problems: $header = "From: $emailrnReply-To: $emailrn"; It should be: $header = "From: webmaster@example.com \r\n Reply-To: $email \r\n";
  13. Notepad++ can do a 'replace all' in multiple files at a time.
  14. So I'm working on a class that loops through a list of remote images and displays some based on width/height criteria (http://website.com/img.jpg, etc). I'm simply using getimagesize($img) to get the info I need. The issue is that I want to display each image as it's validated. As it is, nothing is displayed until the script is finished, then it's all displayed at once. I have the script set to echo the img (<img src="..." />) during each pass of the loop (if it matches the criteria), but yet it still waits till the end of the script to display everything. I've tried using output buffering and flushing with each pass, same result. Is there something I dont know about when reading remote files that causes this behavior?
  15. ^ good catch. perhaps this then: $delivery_range = str_replace(array(' ave', ' st'), array(' avenue', ' street'), $variation); Using the space, one could minimize the number of unintentional replaces, seeing as '1st st' would be more common that '1 st st'. This would be more of a quick/temp solution, nothing serious or long term.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.