Jump to content

PeterPopper

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Everything posted by PeterPopper

  1. Thanks very much for the prompt and very helpful replies. This is what I did while waiting for a response: foreach ($theChartData as $key => $value) { $theChartDataNew[$key]= (int)str_replace('"','',$value); } knsito and Daniel0, that is the solution, it worked perfectly. Thanks. HavokDelta6, that is a cool tip that I have never seen. Thanks, mate.
  2. I have a file on my server that other websites are linking to. The file contains data that will be changed once a day. The problem is that I only want the other websites retrieving the file from my server at 10am and 10pm. The other times (anytime besides 10am and 10pm), I want them to get a cached version of the file from my server. How do I do this with PHP? Thanks.
  3. I need help using the explode function and having the results as numbers, not strings: //this is the first line of the textFiles being read from: 60,66,61,87,87,76,68,70,69,66,69,73,70 while(! feof($fileOpening)) { $externalDataRetrieved[] = rtrim(fgets($fileOpening)); } $theChartData = explode (",", $externalDataRetrieved[0]); The results in $theChartData are all strimngs and not numbers
×
×
  • 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.