Quotes help make search much faster. Example: "Practice Makes Perfect"

Thursday, April 25, 2013

Codecademy Sample Solution: Array Functions I



<html>
    <p>
<?php
// Create an array and push 5 elements on to it, then
    // print the number of elements in your array to the screen
    $fruitbasket = array();
    array_push($fruitbasket, "apple");
    array_push($fruitbasket, "banana");
    array_push($fruitbasket, "grape");
    array_push($fruitbasket, "mango");
    array_push($fruitbasket, "orange");
    print count($fruitbasket);
?>
</p>
</html>

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts