SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what is wrong w/ this code?

    I wrote the following code and doesn't seem to work

    PHP Code:
    <?

    $names 
    = array("Luke""Tim""Bob""James");

    echo(
    "$names[0] is really cool");

    <
    p>

    echo(
    "$names[1] is weird");

    <
    p>

    echo(
    "$names[2] is crazy");

    <
    p>

    echo(
    "$names[3] is funny");

    ?>
    Any suggestions? Thanks!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah its php you can't have <p> without echoing it.

    This will work

    PHP Code:
    <?

    $names 
    = array("Luke""Tim""Bob""James");
    echo(
    "$names[0] is really cool<p>");
    echo(
    "$names[1] is weird<p>");
    echo(
    "$names[2] is crazy<p>");
    echo(
    "$names[3] is funny<p>");

    ?>
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    VICTORY IS MINE! luchazard's Avatar
    Join Date
    May 2001
    Location
    USA
    Posts
    229
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah! Silly me thanks Freddy!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •