Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Oh sorry, an extra closing parenthesis slipped in. Just remove it, i.e. preg_match('#^(\d+){([^}]+)}$#', $string, $matches);
  2. Unless you physically wish to create a new file for each movie then yes, you do need to use mod_rewrite (or similar). Yes, it will. The former has relevant keywords in the URI whereas the latter doesn't. This means the former will rank better.
  3. Bar the fact that IE, having a 67% market share (source), doesn't support it. I'd also like you to back up your argument that XHTML 1.1 is stricter than 1.0 Strict.
  4. No, you need to drop the single quotes around the identifier (name). That's why it doesn't work for you. It's like checking whether the word dog equals the word cat.
  5. You can use regular expressions: $string = '3{this is a test}'; preg_match('#^(\d+){([^}]+)}$#', $string, $matches)); list(, $key, $keytext) = $matches;
  6. You need to do WHERE name = '*******' Keywords should be without quotes or with backticks (`). String literals should be with single quotes.
  7. You need to perform a whois. Check this out: http://code.google.com/p/php-whois/ I haven't used it. I just found it using a Google search.
  8. Dunno if it'll work, but try to set the width to 100%.
  9. Hmm... interesting. I agree with whomever responded to you that documentation should have higher priority though. The current documentation for SPL sucks.
  10. Try to print $key and $value inside the foreach to check that it's getting done correctly.
  11. It's not stricter. Although they look similar they're not based on the same language. HTML uses another syntax so it's rubbish saying that XHTML is stricter for those reasons. No it would not. Read back in this topic. Agreed.
  12. You might want to also modify your registration script to enforce that usernames will match the same regex you are using in your rewrite.
  13. Can't you just do $stmt->execute($q[1]);?
  14. The problem is just that newbie developers do not know what is good and bad code. That's why they're newbies.
  15. Last I checked (quite a while ago), Joomla!'s code sucked. I try to stay away from code I haven't written myself or code that's written by someone I know produces good code.
  16. Whatever you come up with will most definitely be less efficient than using the built-in include_once()/require_once() functionality because those are written in C. Just always use _once and you won't have to think about it.
  17. That's what you use include_once for...
  18. Just store a list of included libraries and check against it each time you are going to include something. If it already exists in the list then abort.
  19. Dunno. Guess you can ask on php.internals.
  20. I'm not sure. Some benchmarks seem to indicate that using the built-in data structures are faster than using arrays though: http://blueparabola.com/blog/spl-deserves-some-reiteration You'll have to wait until PHP 5.3 though.
  21. $_SERVER['REMOTE_ADDR'] By the way, stop posting in app design. This has nothing to do with application design. Also, please do search first. You could have easily looked that up for yourself.
  22. Sure, of course. You should have done that from the start, really.
  23. Look up the word "scope" in the manual. You need to pass the $config array to your object.
  24. Can't you just use an ordered list (<ol>)? echo '<ol>'; for ($i=1; $i <= $nbjoueurs; $i++) { echo '<li><input name="player_' . $i . '" id="player_' . $i . '" type="text" size="30"></li>'; } echo '</ol>';
×
×
  • 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.