Jump to content

Maq

Administrators
  • Posts

    9,363
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Maq

  1. When I run a file with just this in it: $weather_data = simplexml_load_file('ftp://ftp2.bom.gov.au/anon/gen/fwo/IDV10450.xml'); the load time is only a few seconds. Where and how are you running this?
  2. Why do you want to do this?
  3. As desjardins mentioned echo out the subject to see if there is a value. Are you also aware, your call is not in the while loop?
  4. I'm not sure exactly what you're trying to do, could you provide an example? To retrieve contents from a file you can use - file_get_contents. To merge the arrays you can use - array_merge. To put each line into an array you can use explode.
  5. Echo in the if statement right before line 248. Are you sure "pic_mem/Offline" exists? It will be case-sensitive if you're on a unix based server. Other than that, you're going to have to do some debugging such as echoing relevant values.
  6. I cannot view your source. The jquery link I gave you should provide many examples. Try and implement one and come back with your source for specific help. There are also many examples on this site for AJAX using jQuery.
  7. Good. Make sure to mark your threads solved, thx.
  8. You have the correct query, you just need to alter the value after limit. Relating to your first example you would use: ORDER BY id DESC LIMIT 1,1 This means, after you order by 'id', it will go to the first row and select the first one after it.
  9. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=319167.0
  10. I'm lost. Can you provide an example?
  11. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=319161.0
  12. Just wait until you get back Meaning, all of CV's work should be done...?
  13. Please read all the posts, not just the first one. We have already solved the first issue, the OP has presented a second one. (BTW, your regex only matches/returns spaces)
  14. Changing around the 'id' column defeats the purpose of having an auto incremented column. Why does the new row have to be on top? If you insert it normally you can easily find the most recent row. Maybe I'm not understanding completely but I don't think inserting a new row on top every time would do any good, probably harm.
  15. That's what the ctype_alnum check is for. It checks for alphanumerics.
  16. Nah, they're totally different. I mean, you used double quotes and I used all single ;P
  17. How big is this string going to be? If it's relatively small you could use some regex: $string = "1 2 3 4 5 6"; $string = preg_replace('/\s+/', ' ', $string); $arr = explode(' ', $string); print_r($arr); ?>
  18. Why do you want to do this? It shouldn't matter, you can extract rows out whichever order you want with SQL.
  19. Take a look at this link: http://api.jquery.com/jQuery.ajax/ The link you provided is broken BTW.
  20. Have a good holiday and new year everyone!
  21. Not sure what you mean exactly. Because I'm an idiot :-\. Let me rephrase: "I would think you could post javascript variables to php using query strings, Or you could post javascript variable to PHP through a form" But then you would have to load a complete new page. In some cases this wouldn't be a problem but It's alot easier to get PHP into javascript. =$variable?> Sure, if you reload the page you can pass values to PHP via HTTP. If you don't want to reload the page you have to use AJAX.
  22. In this particular instance strpos would be the fastest. You're right requinix, there's no need for regex here.
  23. I think I know what you mean but do you have an example?
  24. You can use preg_match. The syntax you're using is SQL.
  25. I'm not clear as to what you want the list to look like but maybe a listbox. AFAIK, you will have to use JS for the up/down arrows. Something like this maybe: http://viralpatel.net/blogs/2009/06/listbox-select-all-move-left-right-up-down-javascript.html
×
×
  • 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.