Recent content by Danzamagu

  1. D

    Complex Array function for PHP?

    Ok let's say I have this file "a_file.txt" in it is: " Day:4-Night:3-Afternoon:1 " How can I make that data into an array that looks like; Array ( [Day] => 4 [Night] => 3 [Afternoon] => 1 )
  2. D

    Simple PHP Arrays question?

    How can I grab a value from an associative array based on it's key or value? Like for example this; --------------------------------------------------------------------------------------------------- Array ( [sentences] => 1 [intro] => 1 [retarded] => 1 [of] => 1 [because]...
  3. D

    Can someone who knows PHP please explain this to me?

    Please please explain what does this do? ---------------- foreach($array as $val) { print $val; } --------------- Where does the $val come from? How does it know how to assign data to it?
  4. D

    How can I sort the counted keys in an PHP array?

    I was here just a while ago, I got this piece of code from someone who replied to someone else's question. "There is a function to count the number of every value in an array. For example if $input was the array 1, dog, 2, 2, dog, 2, 3, 3, 4, 5, dog, 2, 5 then: $counts = function...
Back
Top