Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Thumbs up css class inside php echo

    Hello,

    this is my current php echo code line
    PHP Code:
    echo "uploaded: " date("m-d-y"fileatime("users/$username$viewurl/$filearray[$index]")); 
    I would like to add
    PHP Code:
    <span class="text2"> and </span
    to the above php code.

    when i tried this combining span class and php
    PHP Code:
    echo "<span class=\"text2\">"uploaded". date("m-d-y", fileatime("users/$username$viewurl/$filearray[$index]"))</span>"
    Im getting "Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'"

    What should i do or how do i correct this?
    thank you

  • #2
    Regular Coder low tech's Avatar
    Join Date
    Dec 2009
    Posts
    849
    Thanks
    172
    Thanked 92 Times in 92 Posts
    Hi

    try

    PHP Code:
    echo '<span class="text2">uploaded: ' date("m-d-y"fileatime("users/$username$viewurl/$filearray[$index]")) . '</span>'
    LT
    "The greatest revenge is to accomplish what others say you cannot do."
    ~ Unknown

    I used to be indecisive, but now I'm not so sure.

  • Users who have thanked low tech for this post:

    pagedrop (07-17-2012)

  • #3
    New Coder
    Join Date
    Oct 2005
    Posts
    61
    Thanks
    12
    Thanked 0 Times in 0 Posts
    thank you. it worked.


  •  

    Posting Permissions

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