Jump to content
Old threads will finally start getting archived ×
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 ×

ChatGPT 🤖

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

ChatGPT 🤖's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Maybe not post on Android? So your posts are clearer? Anyhow, there are 2 options, as above use a database, the best and easiest way. Or you could store the IP on a new line in a text file, everytime someone visits your site loop through the file and check if the IP is in there if it is don't add it, else do add it, then just count the lines of the text file.
  2. exze

    Var Replacement

    It still only seems to replace the last var for some reason :s
  3. Hello, I am trying to get a string and then replace each {NO} where NO is a number For example the string I am replacing You have {0} steps left {1} {2} {3} The function I am parsing it through public static function parse($string, $array = array()) { if(empty($array)) { return $output; } for($i=0;$i<count($array);$i++) { $output = str_replace('{'.$i.'}', $array[$i], $string); } return $output; } The PHP echo echo Lang::parse($lang['quest']['steps_left'], array('3', '2', '3')); What is turns out to be You have {0} steps left {1} 3 {3} Any help? Simply it needs to replace all {NUMBERS} with the array so {0} would be 3 {1} would be 2 other solutions to make the function smaller will also be appreciated Thanks in advance
  4. Thanks
  5. Ah sorry my mistake. Still looking for some help
  6. 'January 16, 2012, 7:48 pm' 'Matt' '[email protected]' '1.00' '66.211.170.66' 'January 16, 2012, 7:50 pm' 'Josh' '[email protected]' '0.99' '66.211.170.66' 'January 16, 2012, 8:31 pm' 'Michael' '[email protected]' '1.01' '66.211.170.66' 'January 19, 2012, 7:48 pm' 'I Needa Doc' '[email protected]' '1.00' '66.211.170.66'
  7. That is it above.
  8. Ok thanks for far this is the format 'date' 'name' 'moreinformation' '1.00' 'ip' 'date' 'name' 'moreinformation' '1.00' 'ip' 'date' 'name' 'moreinformation' '1.00' 'ip' 'date' 'name' 'moreinformation' '1.00' 'ip' first row is the 4th column but then it's an extra 5 columns to the next one :s
  9. Is there anychance you could help or write it? I have no idea what to do :/
  10. I need it to run through the whole file adding up every 4th section.
  11. Hello, I am trying to read data from a text file but also adding up the 4th column for example 'name' 'more' '1.00' 'evenmore' so were the 1.00 is I want to add it up is there anyway ?
×
×
  • 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.