...

View Full Version : css class inside php echo



pagedrop
07-17-2012, 04:50 AM
Hello,

this is my current php echo code line

echo "uploaded: " . date("m-d-y", fileatime("users/$username$viewurl/$filearray[$index]"));

I would like to add

<span class="text2"> and </span> to the above php code.

when i tried this combining span class and php

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

low tech
07-17-2012, 07:47 AM
Hi

try


echo '<span class="text2">uploaded: ' . date("m-d-y", fileatime("users/$username$viewurl/$filearray[$index]")) . '</span>';

LT

pagedrop
07-17-2012, 07:19 PM
thank you. it worked.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum