Jump to content

pea_1

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pea_1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. pea_1

    Variables

    Ofcourse i will, but i've coded that way for quite a lot of my work so i can only correct some of it.
  2. pea_1

    Variables

    I guessed that.. and most scripts i download don't use isset, so maybe it isn't a common setting to have. The response i would rather have would be what the setting is to see if i can get my hosts to turn it off. I've only learned php from other scripts, so blame them for my poor coding
  3. I uploaded some of my scripts onto my friends website and i got errors. I could only correct the errors by using functions like isset. I was wondering why these errors appear when on my friends server and not mine? Is it a setting in the phpini? It's quite annoying as the scripts work fine even with the errors. An example of a complaint is: if($var) which had to be changed to if(isset($var)) and if($var){ $word = "word"; } echo $word; had to be changed to if(isset($var)){ $word = "word"; } else { $word = ""; } Which i think is pointless.
  4. Is it possible to detect page errors such as 404 (page not found)? I've searched good but can't find anything, or i'm not looking in the right places. If so, would you be able to detect it even if a htaccess redirects it to an error page? Thanks, Peter
  5. pea_1

    How to use SQL

    I've got the host and i've tried my ftp username and pass.
  6. Hello. I'm new to SQL databases. I should probably ask in the PHPBB forum but this is also a general question. I'm trying to set up the forum and it's asking for database name, database username and database password. Are these the same as my ftp username and pass or should my host give me a separate one? Thanks. Peter
  7. Yeh it does. I also managed to get the top 5: $excludes = array(); $i = 1; while($i <= 5){ $i++; $output = mode($array); foreach($array as $lnum => $line){ array_push($excludes, trim($output)); foreach($excludes as $exclude){ if(trim($line) == $exclude){ unset($array[$lnum]); } } } echo "$output<br>";
  8. Ah thanks, i was completely lost on this one, but this seems to do the trick.
  9. The array doesn't contain numbers though, they're words
  10. Umm.. this is *extremely* simple maths. Maybe this will help you http://www.manatee.k12.fl.us/sites/elementary/palmasola/mathlabtutstat1.htm
  11. no the mathematical mode. the mode is the most often value. For example, for 1,2,2,2,3 2 would be the mode
  12. Can't figure out how to find the mode of a file (string occurring most often). Has anyone else managed to do it? Peter
  13. Hello, i'm trying to figure out how to put the characters of a string into an array, but i can't. Any ideas? Peter
×
×
  • 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.