Jump to content

salathe

Staff Alumni
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by salathe

  1. Spot the difference: if(in_array(strtolower($info['extension'])), $extensions) - original if(in_array(strtolower($info['extension']), $extensions)) - fixed As for getting the right array or JSON, the replies above should help you out. Also, are all of the files in one folder? The guys above aren't sure whether you need to get files from one directory, several directories, or any level of directories.
  2. Stealing badges is a bannable offence, and we'd confiscate the cake if it happened. Sorry. Back on topic, please.
  3. You have date("m/d/y g:i A",($row['date'])). The second argument to date is expected to be an integer containing the Unix timestamp for the date and time you want to format. You're most likely passing it an already formatted date string. Depending on the format of this date string, it might be sufficient to simply use strtotime to convert it into a Unix timestamp before re-formatting with date. date('m/d/y g:i A', strtotime($row['date'])) However, strtotime cannot make sense of every possible date/time string. If the above does not work, show us the value for $row['date'] as there are other alternatives available for when strtotime does not work.
  4. I went to the URL in the first post, opened Chrome's Developer Tools, clicked to the Network tab. Then, clicked the header in the table and looked for the address of the page requested by JavaScript.
  5. You can loop over the array's keys by using something like foreach(array_keys($priceArr) as $date), then inside the loop do whatever checking you need and build the date array. For example: $dateArr = array(); foreach (array_keys($priceArr) as $date) { $datetime = new DateTime($date); if ($datetime->format('F') == 'September') { $dateArr[] = $datetime->format('j'); } }
  6. The parenthetical remark is incorrect, is_null is a perfectly normal function and not a language construct.
  7. http://www.google.de/products/catalog?hl=de&q=4242002690209&cid=2594634728159287170&cpo=1&scoring=tps Also, the cpo=1 can be removed to get a full page.
  8. Very little discussion happend for this particular RFC, so whether it has a good chance of being introduced or not is up in the air. That said, the lack of discussion is telling; useful things usually get more chatter. Not yet, and this particular horse has been running for some time. Comments on the idea are positive, with very few dissenting voices. There have been lots of minor tweaks as particular implementation details get hammered out. The outlook is positive for this one, but no vote has been held nor any code committed. I may have to bear the brunt of your scoffing, but will continue to use global regularly. So long as @global is made to work, I'd accept your suggestion.
  9. https://wiki.php.net/rfc/horizontalreuse#links_and_literature
  10. Oh really? Ya really. 1zeus1, what have you tried so far?
  11. Good work on reading it, really. I guess you totally failed to see my point, which was that .josh "couldn't imagine" something that was very clearly asked for in the first post. Did you think I was trying to say .josh said something wrong?
  12. I think they're going to laugh at you from behind their nice, dry stacks of money that you gave to them.
  13. str_replace() does not replace based on a regular expression, you're looking for preg_replace().
  14. You're getting there. And trying to answer questions is a great way of learning! Every day is a school day.
  15. Why not access them directly? The OP seemed to have no problem with knowing what (the element names) he wanted to get information from. Anyway, you already know how to get values from the child elements whose names you don't know (like the gauges).
  16. In this case, that's not particularly useful at all as there is only one <FifteenMinute> element per gauge.
  17. Wow a blast from the past there. It is super-duper ancient (a decade ago) and there was never a release made.
  18. I guess I am not understanding your desire to stuff everything into a nested array. It is not needed and only making more work for yourself.
  19. You're already doing it, in part, when calling get_object_vars(). If you haven't already, have a look over the SimpleXML Basic Usage page. $start = (string) $gauge->FifteenMinute->SampleDateStart;
×
×
  • 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.