Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

convert this code from asp to php (date related)

$
0
0

Hey guys,

Im wanting to have this bit of code rewritten into PHP.

 

It basically checks the date pulled from the DB and if its only 2 days old, it displays a "new listing" image.

<%share_newlisting = DateDiff("d", rstDBEdit("share_datecreated"), now())
			if share_newlisting < 2 then%>
            <div style="margin-top:5px"><img src="/images/new_listing.gif" width="81" height="15" align="absbottom"></div>
            <%end if%>

Viewing all articles
Browse latest Browse all 13200

Trending Articles