Basic Syntax Help
Posted: Wed Nov 26, 2008 9:21 am
Hi all,
I have been following a tutorial on how to have an image gallery dynamically generate columns.
I have came across this line of code and i don't know what it does:
mainly what the ? and : do here? (i put the substr() on to trim the path!)
Any help would be appreciated!!!
Thanks,
C
I have been following a tutorial on how to have an image gallery dynamically generate columns.
I have came across this line of code and i don't know what it does:
Code: Select all
$numImages = substr($row['thumb'],3) > 1 ? substr($row['thumb'],3) . ' images' : substr($row['thumb'],3) . ' image';Any help would be appreciated!!!
Thanks,
C