Jump to content

DarkWater

Members
  • Posts

    6,173
  • Joined

  • Last visited

    Never

Posts posted by DarkWater

  1. Why make yourself type all of that extra stuff?  You can refer to the array elements with the numbered index (starting at 0):

     

    <?php
    $p = array('clientID'=> $clientID, 'cityID'=> $cityID, 'productsIDs'=> array(22, 63, 59));
    print_r($p);
    /*Output:
    Array
    (
        [clientID] => 12
        [cityID] => 4
        [products] => Array
            (
                [0] => 22
                [1] => 63
                [2] => 59
            )
    
    )
    */
    ?>
    

    You can just do $p['productsIDs'][0], etc.[/code]

  2. yeah I mean not to browse the content of the folder and be able to download the music, beacause they can listen to them only.

     

    Is there a way to protect it?

     

    You can try...but there's nothing that you can actually do to protect it completely.  The only way for that to happen would be to make a music player in Flash that serves the music.  That's the only way I can think of, at least.

  3. if I put them inside the directory, how can I protect the folder not to be opened, only people can listen to the music?

     

    What do you mean "not to be opened"?  You mean like, actually go and browse the contents of the folder?

  4. above the document root

     

    HTTP path

     

    That's like dividing by zero.  It just doesn't work.

     

    In all seriousness, the whole point of storing something above the document root is so that there is no HTTP path.  You can make a script to push the MP3's to the browser if you want.  That would work even if the MP3's are stored above the web root.

  5. Lmfao, I love how most of the people on the thread just tl;dr'd but still have an opinion. xD

     

    About Twitter though, I still don't know what to think of it.  A lot of people have it, but it seems extremely pointless.  I'm totally not against social networking sites (I have a Facebook and positively adore it), but I feel like Twitter is just a website dedicated to the same thing that Facebook statuses accomplish.  Oh well. =/

     

    And I loved how you addressed the people in the movie theater as directions. =P  Actually made me chuckle.

  6. Well, the center is really empty.  And I'm not the biggest fan of the crude logo either, but that's just me.  Definitely needs more center content to fill it out though.

     

    So, it's a Greek web design site? =P  Interesting.  Μιλώ ελληνικά. Οχτώ έτη στο ελληνικό σχολείο.  -_-

  7. I did find a window that looks like it could be two people doing it.  I don't think that's what it really is, but still...

     

    tallest building.  If you look at street level there's a white SUV next to 2 red box looking things.  Follow that straight up, right above the ground level store or whatever.

     

    Could be.  xD  Right below the apartment with the family eating dinner?

  8. Try following the example from php.ner. -_-  You're calling end() on each individual element in the array, instead of once on the whole array, before the loop.

    law did it correctly. He/She just didn't need to loop.

     

    foreach ($pieces as &$p2){
       $last_piece = end($p2);
    

    $pieces is the array, $p2 is the individual element.  What's wrong with that picture?

     

    Also:

    if ($p2 = last_piece ...
    

    Should be 2 =.

  9. You didn't set up the keys correctly in the array.

     

    <?php
    
    $genres = array (
         'Comedy' => array("Superbad", "Yes Man", "Anchor Man"),
         'Horror'    => array("Texas Chainsaw Massacre", "People Under The Stairs", "Slither"),
        );
    
    foreach($genres as $genre){
        echo "<p>$genre:</p>\n<p>";
        foreach ($genre as $num => $movie) {
            echo "$num: $movie<br />\n";
        }
        echo "</p><br />";
    }
    

     

    Should be good.

  10. Very nice of you but this is a php help forum which means you come here for help not to help those who are not seeking it ;)

     

    Umm, that makes little sense.  If there's no people who come here to help other people, then there would be no one posting solutions.  =/

×
×
  • 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.