Jump to content

Alex

Staff Alumni
  • Posts

    2,467
  • Joined

  • Last visited

Everything posted by Alex

  1. You'll have to do some research to if those servers implement what you're looking to do.
  2. To be able to do this the server has to be setup to respond to a certain packet with that information. Unless it's setup up to do that, and you know the protocol for it, you won't be able to.
  3. Yes, it's possible. I have several projects that include a flash client and a socket server written in PHP.
  4. You need to be more specific. How isn't it working, are you getting some kind of an error, unexpected results (if so, what are they), or what?
  5. See here. This was removed due to misconceptions that post counts give.
  6. Just like that, but you need to use double quotes. Single quotes don't have variable interpolation.
  7. I have a PHP application that is running from the CLI. This application will sometimes require a connection to a mysql database. I was wondering if I should create and close a new mysql connection every time I need to preform a query on the database, or if I should just keep one open throughout the entire duration of the program. If the latter I assume that because it's a single execution of the script (even though the duration will be very long periods of time) using a normal connection vs a persistent connection would have no effect.
  8. I'm sure both JAVA and Flash have their advantages and disadvantages. There's no reason a MMORPG can't be made in Flash. Just look at Dofus.
  9. For converting line breaks to html breaks use nl2br
  10. My point exactly. The experience you gain working for a company is very much a valuable thing. I don't disagree, but I think from the start we've been talking about two different things. Cags was originally talking about web development experience, and you've been talking about work experience. They are the same thing if you work as a web developer. You just don't get the same experience studying. They're not exactly the same. Working as a web developer professionally is web development experience, but studying web development isn't work experience. And in this case cags was referring to his experience with web development. Your originally point that it's a fair assumption that they won't have much work experience is in most cases fair. But I wasn't talking about that in the first place, and I don't believe cags was either.
  11. My point exactly. The experience you gain working for a company is very much a valuable thing. I don't disagree, but I think from the start we've been talking about two different things. Cags was originally talking about web development experience, and you've been talking about work experience.
  12. I don't see how working for a company is relevant as the guy we're talking about was freelancing, and not working for a company. Plus, I'm fairly certain we were discussing the experience in a field, not in the freelancing, or working in that field specifically. The guy stated he has 4 years experience with web development, nothing about working with company, or freelancing.
  13. Not always, a friend of mine has been seriously studying and been working in application development (primarily C/C++) since he was 9 years old. He is now 20 with 11 years of programming experience and is now studying computer science in college. I'm 16 years old and I've been studying programming seriously for over 3 years. But perhaps I'm misunderstanding the matter at hand. Are we talking about having experience and knowledge within the field, or experience with freelancing in the field?
  14. While I agree with you that 'dicking around with websites' wouldn't qualify as web development experience I find it unfair to assume this is what their experience consists of.
  15. You should be escaping all user input that will be used in a MySQL query with mysql_real_escape_string.
  16. There won't be a perfect way to do this. I don't know what you're trying to do, but optimumly you should have the last name stored separately. You have no way to distinguish between, say, a two-word last name, or just a middle name and a last name. The example I provided was just a solution to the given example.
  17. Something like this should work: function cmplast($a, $b){return strcmp(end(explode(' ', $a)), end(explode(' ', $b)));}$names = array('John Smith','Fred Johnson','Mark Williams');usort($names, 'cmplast');echo implode("<br />\n", $names); Output: Fred JohnsonJohn SmithMark Williams
  18. echo '<strong>Subject:</strong> <p>'.$row['subject'].'</p><br/>';
  19. array_diff print_r(array_diff($array1, $array2));
  20. If you're going through the array and added each one one at a time you can check to see if it's in the array using in_array. Otherwise one option would be to use array_merge and array_unique $arr = array_unique(array_merge($arr1, $arr2, $arr3));
  21. You need to pass $query to mysql_num_rows (see the manual link).
  22. if(!run() || empty($pdata)) { // ... }
  23. Are they \n or \r\n line breaks? Either way you should try wildteen88's suggestion. First use nl2br to convert the line breaks to html line breaks. Then change those. $text = "<p>" . str_replace("<br /><br />", "</p><p>", nl2br($text)) . "</p>";
  24. $text = "<p>" . str_replace("\n\n", "</p><p>", $text) . "</p>";
×
×
  • 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.