Jump to content
Old threads will finally start getting archived ×

requinix

Administrators
  • Posts

    15,262
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by requinix

  1. Go through the lines in the file and keep track of (=store in an array) the lines you actually want to choose from. Then array_rand() on that.
  2. Try something more like foreach ($array as $key => $value) { if ($value is an array) { $return = recursive search on $value; if ($return means that the search found the value) return $return; } else if ($value matches the search value) { return whatever you want; } }
  3. Well, like I said it's a problem on their server. Contact them and see if they can fix whatever the problem is. Or it could be that a 500 error means there's no location (or something like that) and you should do something different. Or something.
  4. A tags are anchors (and inline). Use a DIV instead (which is block).
  5. A 500 error means a problem on the remote server. Is it your server too or what?
  6. mysqld is the server process: that needs to be running before you can connect to it.
  7. Do you need to specify a "category" in that $arg2?
  8. copy works too.
  9. That syntax is bad, yes. Accessing them in general is fine, but the way to do it is self::$FormatType Yes, PHP is tolerating the code, but somewhere it's creating warning messages (even if you can't see them).
  10. requinix

    Json

    $offers is an array of offers. $object = array( "pages" => 2, "offers" => $offers ); JSON-encode that.
  11. #194#160 is the UTF-8 encoding of a non-breaking space. So decode it first, remove the whitespace, and re-encode it.
  12. You don't need more code for this. $max = min(array($sym, $res)); There. Do you understand it now? If you don't ever want $naq to be the minimum then don't include it in the list.
  13. I would love to hear the actual problem you're trying to solve. The one that you think this generating-functions-at-runtime stuff is the solution to. Because honestly: this is all silly. There are much better ways.
  14. Use SimpleXML and an XPath query. If there's only the one in the whole document, //int[@name='reqJob']
  15. number_format() doesn't quite do what you're expecting. Try round instead.
  16. Is stripping out the HTML tags an option?
  17. PHP 6 was scrapped. There are no plans for it whatsoever. Anything said about it is meaningless.
  18. One per second? See, this is why I asked and didn't just give you a blind answer. You don't need AJAX for that. Pure JavaScript will be fine. Set an interval for every one second, and when your function fires increase the counter. That's all.
  19. Are you using mysqli_connect()? Are you sure $dbc is an open connection?
  20. You don't have to parse it yourself. SimpleXML will do that. If you don't know how to use it, check the manual for examples.
  21. First word is "AJAX". Second word is generally like "auto-populate" or "auto-generate" or something like that. But basically it's just AJAX. When the one list changes you do an AJAX request to find out what should go in the next list. (And then you put the items in there.)
  22. What are you counting? At (about) what rate does it normally increase?
  23. Look at where you put your parentheses. They aren't all in the right places. And you don't need to mysql_real_escape_string() a number. And you don't need to use quotes in the query if they're around numbers.
  24. Certainly possible. Start with SimpleXML.
×
×
  • 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.