Jump to content

Alex

Staff Alumni
  • Posts

    2,467
  • Joined

  • Last visited

Everything posted by Alex

  1. The problem is that you're using single quotes which will take the string literally, and not take \n as a new line character. Instead use double quotes.
  2. continue and break do completely different things. continue will skip the current iteration of the loop and move onto the next while break will break out of the loop entirely.
  3. try: ~\[youtube=([^\]]+)\]~
  4. edit: nevermind, I posted before you edited and actually put your question. try: SELECT gameID from gamedetails where startDate >= date('2010-5-26') AND endDate < AND date('2010-5-26') AND gameIsActive = 1 is not right.
  5. Put this at the top of the script: error_reporting(E_ALL | E_STRICT);
  6. Of course, you can nest as many if statements as necessary. echo ($t = strtotime($row_rsworksorders1['intraartapproval'])) < time() - 60*60*24*14 ? '<span style="color:#ff0000;">' . KT_FormatForList(date('d/m/Y',$t), 20) . '</span>' : KT_FormatForList(date('d/m/Y',$t), 20);
  7. Right from the page with the example you linked to:
  8. Any string will evaluate to true. So "true" == true, "false" == true or "anything" == true. You're setting a boolean value, not a string so you should not use quotes.
  9. You have an elseif without a condition. Perhaps you mean else? You have also forgotten a semicolon on this line: echo "no targets"
  10. You're not concatenating the string correctly. header("Location: http://75.126.76.220/mob_hi5/attack_hitlist?user_id=492711089&target_id=" . $user_id[0] . "&session_id=b00b6b4d2d7b124a41c3c5650af902fe5f718a61&auth_key=b00d1f9387158859780c072555ed822124728e57&original_url=http://75.126.76.220/mob_hi5/attack_hitlist&nocache=1274268208017&");
  11. use array_diff: $new = array_diff($arr1, $arr2);
  12. I never thought you meant it was impossible either. I was just stating that for the purposes of the OP who might not have known that.
  13. It is possible though, with some atypical syntax. switch(true) { case $value != 50: // ... break; }
  14. Same thing happened to my friends laptop, in his case it was his power cord, he needed to buy another one. Luckily in his case he was able to use a friend's cord to see if it was the source of the problem. So it could be that, you'd need to test it. By the way, do you use your laptop often while plugged in? If laptop is fully charged it's a bad idea to keep it plugged in, it could lead to issues like this. Instead you should remove the battery if you're just going to use it while plugged in.
  15. You can probably finds tons of these with a quick search. Here's one I found: http://www.andrewsellick.com/75/simple-3d-carousel-using-mootools
  16. It's sloppy to allow access to your website both with and without www. You should be forcing one or the other. This article should help you: http://www.jonlee.ca/forcing-www-in-domain-name/
  17. 107, 104 adjusted. http://play.typeracer.com is a fun little typing game. I usually average about 125 WPM.
  18. Notepad++ has an extension for this. http://www.rarst.net/software/notepadpp-ftp-plugin/
  19. You need to include the class declaration. Even if you have the include_path configuration option set to include the directory where your class definitions can be found it won't work unless it's being included. The include_path configuration setting is often mentioned in situations like this where you're using an autoloader to load classes. Ex: function __autoload($classname) { require_once "$classname.php"; }
  20. http://stackoverflow.com/questions/491490/how-to-use-jquery-in-firefox-extension
  21. It's called BBcode, look it up you can easily find examples on how to implement it.
  22. You could replace: $value = array_map("add_strip_slashes_deep", $value); With: $value = array_map("add_strip_slashes_deep", $value, array_fill(0, sizeof($value), $function)); or just: foreach($value as &$element) { $element = add_strip_slashes_deep($element, $function); }
  23. You haven't provided enough information. The problem isn't in the code you provided, that's just where it's occurring because you provided the Database_MySQLi::fetch method with a variable that is expected to be an object but is not. To help you will need to post the code around where Database_MySQLi::fetch is being called.
×
×
  • 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.